0.0.2 • Published 8 years ago

trans.form v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

trans.form Build Status

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 Objects

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