0.0.2 • Published 8 years ago
trans.form v0.0.2
trans.form
A Wrapper around object-manip to be used on any object to allow transformations.
To see why this is safe or not safe refer to my library
Install
$ npm install --save trans.form
Usage
const transform = require('trans.form');
let x = {
a: 2
}
x[ transform ]( {
a: function(x){
return x + 2;
}
} )
//=> { a: 4 }
API
transForm
Returns the key to be able to manipulate the object.
Methods available to all Object
s
transform( transformerObject )
input
Type: Object
Must conform to the formatting specified by object-manip
Returns a new object after all the values of the current object have been transformed.
transform.save( transformerObject )
This is a mutable method!
This if the exact same as above but saves all changes into the object.
License
MIT © Nick The Sick