Skip to content

mertkahyaoglu/array-counter

Repository files navigation

NPM version Build Status

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

About

Node module for counting array elements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published