array-counter
v1.0.0
Published
Counts unique elements of an array
Downloads
1
Maintainers
Readme
counts unique elements of an array
Install
$ npm install --save array-counter
Usage
var arrayCounter = require('array-counter');
var arr = ["foo", "bar", 10, 40, "foo", 10, "Hello World"];
arrayCounter(arr);
//> {
// '10': 2,
// '40': 1,
// foo: 2,
// bar: 1,
// 'Hello World': 1
// }
License
MIT © Mert Kahyaoğlu