npm-setArray
v0.1.3
Published
It removes duplicate objects form given input array and returns unique objects
Downloads
4
Readme
#setArray
Install
$ npm install npm-setArray
Then in code you can do:
var storage = require('npm-setArray');
Basic Example
var set = require('npm-setArray')
var inputArray =[ {
name:'vishnu',
id:100,
email:'[email protected]'
}
,
{ name:'raj',
id:101,
email:'[email protected]'
},
{
name: 'vishnu',
id: 100,
email: '[email protected]'
}];
console.log(set.unique(inputArray)) ;
Run the examples:
output
------
[ { name: 'vishnu',
id: 100,
email: '[email protected]'
},
{
name: 'raj',
id: 101,
email: '[email protected]'
}
];