group-by-prototype
Group an Array of objects by key or with a function.
Installation
npm install --save group-by-prototype
Usage
example reading last 50 lines of a file
;const data ="key": "word""value": "hello""key": "word""value": "world""key": "number""value": 2;let groupedByKey = data;let groupedEvenOdd = 4958163027;/*{"even": [4,8,6,0,2],"odd": [9,5,1,3,7]}*/let groupedIndexEvenOdd = 8642013579;/*{"even": [4,5,1,3,2],"odd": [9,8,6,0,7]}*/
Contributing
- Fork it on Github https://github.com/alexbbt/group-by-prototype
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D