property-mapper
v1.0.5
Published
To map property
Downloads
8
Readme
property-mapper v1.0.5
property mapper is a package which will use for mapping with model
Installation
Using npm:
$ npm i -g npm
$ npm i --save property-mapper
In Node.js:
// Load the full build.
var { propertyMapper } = require('property-mapper');
See the package source for more details.
Usage:
var model = ['userName', 'userMail', 'age'];
var obj = { userName: 'mark', userMail: '[email protected]', interest: 'gaming' }
console.log(propertyMapper(model, obj));
//output: { userName: 'mark', userMail: '[email protected]' }