trans.form

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i trans.form

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • nperez0111