Package Exports
- schema-utils
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (schema-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Install
npm install --save schema-utils
Usage
validateOptions
import validateOptions from 'schema-utils'
validateOptions('path/to/schema.json', options, 'Loader/Plugin Name')
Examples
Loader
import { getOptions } from 'loader-utils'
import validateOptions from 'schema-utils'
function loader (src, map) {
const options = getOptions(this) || {}
validateOptions('path/to/schema.json', options, 'Loader Name')
}
Plugin
import Tapable from 'tapable'
import validateOptions from 'schema-utils'
class Plugin extends Tapable {
constructor (options) {
validateOptions('path/to/schema.json', options, 'Plugin Name')
}
}
Maintainers
![]() |
![]() |
![]() |