Package Exports
- property-handlers
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 (property-handlers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
property-handlers
Installation
npm install property-handlers --save
Usage
var propertyHandlers = require('property-handlers');
propertyHandlers(object, handlers, path);
Arguments
object
: An object with propertieshandlers
: An object with properties that correspond to allowed properties. The value of each property should be a handlerfunction
path
: Used for error reporting
Example:
var object = {
foo: 'foo',
bar: 'bar'
};
propertyHandlers(
object,
{
foo: function(value) {
// value === 'foo'
},
bar: function(value) {
// bar === 'bar'
}
},
'some path');