Installations
npm install hasharray-grouping
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
0.10.32
NPM Version
2.1.8
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
joshjung
Download Statistics
Total Downloads
2,289
Last Day
1
Last Week
1
Last Month
6
Last Year
119
GitHub Statistics
3 Commits
2 Watching
1 Branches
1 Contributors
Bundle Size
7.12 kB
Minified
2.32 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.0.3
Package Id
hasharray-grouping@0.0.3
Size
3.46 kB
NPM Version
2.1.8
Node Version
0.10.32
Total Downloads
Cumulative downloads
Total Downloads
2,289
Last day
0%
1
Compared to previous day
Last week
-75%
1
Compared to previous week
Last month
500%
6
Compared to previous month
Last year
5.3%
119
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
HashArrayGrouping
This is an extension of the hasharray. It provides automated grouping of all added items by the groupFields you specify.
Example
var HashArrayGrouping = require('hasharray-grouping');
var hag = new HashArrayGrouping(['city', 'state'], 'state');
var salina, wichita;
items = [
(wichita = {city: 'wichita', state: 'kansas'}),
{city: 'hutchinson', state: 'kansas'},
(salina = {city: 'salina', state: 'kansas'}),
{city: 'hays', state: 'kansas'},
{city: 'chicago', state: 'illinois'},
{city: 'los angeles', state: 'california'}
];
hag.addAll(items);
console.log(hag.group['state']['kansas'][0] == wichita); // true
console.log(hag.group['state']['kansas'][2] == salina); // true
Testing
mocha
License
The MIT License (MIT)
Copyright (c) 2014 Joshua Jung
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 0/3 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More