Socket
Socket
Sign inDemoInstall

nested-groupby

Package Overview
Dependencies
2
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 2.0.0

dist/index.d.ts

18

dist/nested-groupby.esm.js

@@ -5,12 +5,14 @@ import groupBy from 'lodash.groupby';

function nestedGroupBy(seq, keys) {
if (!keys.length) {
return seq;
}
const first = keys[0];
const rest = keys.slice(1);
return mapValues(groupBy(seq, first), function (value) {
return nestedGroupBy(value, rest);
});
if (!keys.length) {
return seq;
}
var first = keys[0];
var rest = keys.slice(1);
return mapValues(groupBy(seq, first), function (value) {
return nestedGroupBy(value, rest);
});
}
export default nestedGroupBy;
//# sourceMappingURL=nested-groupby.esm.js.map
{
"name": "nested-groupby",
"version": "1.0.4",
"main": "dist/nested-groupby.cjs.js",
"module": "dist/nested-groupby.esm.js",
"browser": "dist/nested-groupby.umd.js",
"author": "Marcus T. Hellams",
"version": "2.0.0",
"license": "MIT",
"main": "dist/index.js",
"description": "A multi-level groupBy for arrays. Nesting allows elements in an array to be grouped into a hierarchical tree structure; think of it like the GROUP BY operator in SQL, except you can have multiple levels of grouping, and the resulting output is a tree rather than a flat table. The levels in the tree are specified by key functions.",
"dependencies": {
"lodash.groupby": "^4.6.0",
"lodash.mapvalues": "^4.6.0"
},
"repository": "https://github.com/MarcusTHellams/nested-groupby",
"homepage": "https://github.com/MarcusTHellams/nested-groupby",
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-node-resolve": "^7.0.0",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"rollup": "^1.29.0"
"typings": "dist/index.d.ts",
"files": [
"dist",
"src"
],
"engines": {
"node": ">=10"
},
"scripts": {
"clean": "node scripts/removeDist.js",
"build": "rollup -c",
"dev": "rollup -c -w",
"test": "node test/test.js",
"pretest": "npm run build",
"build:remove": "run-s clean build",
"prepublish": "npm run build:remove"
"start": "tsdx watch",
"go": "node dist/index.js",
"build": "tsdx build",
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"size": "size-limit",
"analyze": "size-limit --why"
},
"files": [
"dist"
]
"peerDependencies": {},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
},
"name": "nested-groupby",
"author": "Marcus T. Hellams",
"module": "dist/nested-groupby.esm.js",
"size-limit": [
{
"path": "dist/nested-groupby.cjs.production.min.js",
"limit": "10 KB"
},
{
"path": "dist/nested-groupby.esm.js",
"limit": "10 KB"
}
],
"devDependencies": {
"@size-limit/preset-small-lib": "^5.0.1",
"@types/lodash.groupby": "^4.6.6",
"@types/lodash.mapvalues": "^4.6.6",
"@types/node": "^16.3.2",
"husky": "^7.0.1",
"size-limit": "^5.0.1",
"ts-node": "^10.1.0",
"tsdx": "^0.14.1",
"tslib": "^2.3.0",
"typescript": "^4.3.5"
},
"dependencies": {
"lodash.groupby": "^4.6.0",
"lodash.mapvalues": "^4.6.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc