1.1.1 • Published 8 years ago
property-handlers v1.1.1
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');
1.1.1
8 years ago
1.1.0
8 years ago
1.0.1
9 years ago
1.0.0
10 years ago
0.2.2-beta
10 years ago
0.2.1-beta
10 years ago
0.2.0-beta
10 years ago
0.1.0
10 years ago