{"_id":"@aeinbu/aggregates","_rev":"2-eed59dd6bd3396ed722ed7a05fd444ed","name":"@aeinbu/aggregates","description":"Lightweight and non-intrusive aggregate functions to use with array reducers","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0-beta-1":{"name":"@aeinbu/aggregates","version":"1.0.0-beta-1","keywords":["minof","min of","maxof","max of","sumof","sum of"],"author":{"name":"Arjan Einbu","email":"arjan@einbu.no"},"license":"MIT","_id":"@aeinbu/aggregates@1.0.0-beta-1","maintainers":[{"name":"aeinbu","email":"arjan@einbu.no"}],"homepage":"https://github.com/aeinbu/aggregates#readme","bugs":{"url":"https://github.com/aeinbu/aggregates/issues"},"dist":{"shasum":"e1931176511768cf30988bb68dcd785031c2fb9f","tarball":"https://registry.npmjs.org/@aeinbu/aggregates/-/aggregates-1.0.0-beta-1.tgz","fileCount":19,"integrity":"sha512-iZfZJv3rfwwmIycQeDP1tyWOX9WWZYLNO2x3i8PA6Ek8dLnT3nIUm+PNBpz0nk7P8sye1yCqcLXNm9UtNiVXoQ==","signatures":[{"sig":"MEUCIQCAgsjepTQm8C4sEJWc4QLZssuNGOqLgGVAK0fQRluZuwIgUKtX2dVUQ39NXtBBxPaJGNqURGcFSt8WFIM27G6trO8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12445},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"abf1601ccb594dc8ed21e2d5918468925600ce00","scripts":{"test":"jest --config jestconfig.json","build":"tsc","prepare":"npm run build","version":"git add package.json","test-watch":"jest --config jestconfig.json --watch","lint-autofix":"eslint --fix src/**/* tests/**/*"},"_npmUser":{"name":"aeinbu","email":"arjan@einbu.no"},"repository":{"url":"git+https://github.com/aeinbu/groupby.git","type":"git"},"_npmVersion":"10.1.0","description":"Lightweight and non-intrusive aggregate functions to use with array reducers","directories":{"test":"tests"},"_nodeVersion":"20.9.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.0","ts-jest":"^27.0.5","typescript":"^4.4.3","@types/jest":"^27.0.1"},"_npmOperationalInternal":{"tmp":"tmp/aggregates_1.0.0-beta-1_1699455927472_0.9139100253218513","host":"s3://npm-registry-packages"}},"1.0.0-beta-2":{"name":"@aeinbu/aggregates","version":"1.0.0-beta-2","keywords":["minof","min of","maxof","max of","sumof","sum of"],"author":{"name":"Arjan Einbu","email":"arjan@einbu.no"},"license":"MIT","_id":"@aeinbu/aggregates@1.0.0-beta-2","maintainers":[{"name":"aeinbu","email":"arjan@einbu.no"}],"homepage":"https://github.com/aeinbu/aggregates#readme","bugs":{"url":"https://github.com/aeinbu/aggregates/issues"},"dist":{"shasum":"bbeb305f916d682c4c4d224a4c18c7b62892a37e","tarball":"https://registry.npmjs.org/@aeinbu/aggregates/-/aggregates-1.0.0-beta-2.tgz","fileCount":19,"integrity":"sha512-OoVO+KE7Fr5hJttmNdtZAzPre5Azg1ZqQjwlEVK8bZI5+L03Qu83C8ZRr168pi2vR6bHvjABtBwPuxB5hUQ8aA==","signatures":[{"sig":"MEUCIF2dzUUYby134z1hccM9SMvuD3WOruR6yAwBR2+1UQNRAiEA+i6GFSdlqr2Ejq+zbLg8qeCSru0BQthWhpEzOe/qeLU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12625},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"edd0aa53da3aef4f0c015418d166ba60eb04afc8","scripts":{"test":"jest --config jestconfig.json","build":"tsc","prepare":"npm run build","version":"git add package.json","test-watch":"jest --config jestconfig.json --watch","lint-autofix":"eslint --fix src/**/* tests/**/*"},"_npmUser":{"name":"aeinbu","email":"arjan@einbu.no"},"repository":{"url":"git+https://github.com/aeinbu/aggregates.git","type":"git"},"_npmVersion":"10.5.0","description":"Lightweight and non-intrusive aggregate functions to use with array reducers","directories":{"test":"tests"},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^27.2.0","ts-jest":"^27.0.5","typescript":"^4.4.3","@types/jest":"^27.0.1"},"_npmOperationalInternal":{"tmp":"tmp/aggregates_1.0.0-beta-2_1714905398021_0.1368181138474176","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@aeinbu/aggregates","version":"1.0.0","description":"Lightweight and non-intrusive aggregate functions to use with array reducers","main":"dist/index.js","types":"dist/index.d.ts","directories":{"test":"tests"},"scripts":{"test":"jest --config jestconfig.json","test-watch":"jest --config jestconfig.json --watch","build":"tsc","prepare":"npm run build","version":"git add package.json","lint-autofix":"eslint --fix src/**/* tests/**/*"},"repository":{"type":"git","url":"git+https://github.com/aeinbu/aggregates.git"},"keywords":["minof","min of","maxof","max of","sumof","sum of"],"author":{"name":"Arjan Einbu","email":"arjan@einbu.no"},"license":"MIT","bugs":{"url":"https://github.com/aeinbu/aggregates/issues"},"homepage":"https://github.com/aeinbu/aggregates#readme","devDependencies":{"@types/jest":"^29.5.12","jest":"^29.7.0","ts-jest":"^29.1.5","typescript":"^5.5.3"},"_id":"@aeinbu/aggregates@1.0.0","gitHead":"536622c211f6fee2aaa4f6ad78fb23f8ff8ece9f","_nodeVersion":"20.15.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-O9+aRKlKI9qjkQLn+3DgYzK10rEjZVEPgf4iqsuCyhy7PO+tTM7tRMzKO0pkMX/GhoADl3saE1/8Rvwyq1YD0Q==","shasum":"63c5550928654775f0363cf3f6c2935afe6fb245","tarball":"https://registry.npmjs.org/@aeinbu/aggregates/-/aggregates-1.0.0.tgz","fileCount":19,"unpackedSize":12720,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1QfC5PeYV8DneCPqCp1CJZkU7FPI9YcQEPif1Eyl1GQIhAOfq9IRcAOrATcDZBn6WAHTgXFQrWxI3QfrkDcLBvxOR"}]},"_npmUser":{"name":"aeinbu","email":"arjan@einbu.no"},"maintainers":[{"name":"aeinbu","email":"arjan@einbu.no"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aggregates_1.0.0_1720220136751_0.8725840316760975"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-08T15:05:27.373Z","modified":"2024-07-05T22:55:37.412Z","1.0.0-beta-1":"2023-11-08T15:05:27.623Z","1.0.0-beta-2":"2024-05-05T10:36:38.183Z","1.0.0":"2024-07-05T22:55:36.900Z"},"maintainers":[{"name":"aeinbu","email":"arjan@einbu.no"}],"author":{"name":"Arjan Einbu","email":"arjan@einbu.no"},"repository":{"type":"git","url":"git+https://github.com/aeinbu/aggregates.git"},"keywords":["minof","min of","maxof","max of","sumof","sum of"],"license":"MIT","homepage":"https://github.com/aeinbu/aggregates#readme","bugs":{"url":"https://github.com/aeinbu/aggregates/issues"},"readme":"# @aeinbu/aggregates\n\nLightweight and non-intrusive aggregate functions to use with array reducers\n\n- The functions are lightweight, as they are small and don't make you bring along lots of functions you don't need.\n- These functions run just as well in a browser as they do in nodejs.\n- The package is non-intrusive, as it doesn't extend arrays adding new and non-standard methods to them.\n  - This is done by having functions that you use with `.reduce(...)` on arrays.\n- @types are included for better discoverability during development when you use editors with javascript/typescript intellisence support\n\n\n## How to install <img alt=\"npm (scoped)\" src=\"https://img.shields.io/npm/v/@aeinbu/aggregates\">\n\nWith npm\n```shell\nnpm install @aeinbu/aggregates\n```\n...or with yarn\n```shell\nyarn add @aeinbu/aggregates\n```\n\n## Quickstart\n```javascript\nimport { maxBy, minOf, sumOf } from \"@aeinbu/aggregates\"\n\nconst capitals = [\n    { name: 'Oslo', population: 709000 },\n    { name: 'Stockholm', population: 985000 },\n    { name: 'Copenhagen', population: 657000 }\n]\n\ncapitals.reduce(maxBy(x => x.population), null)  // returns { name: 'Stockholm', population: 985000 }\ncapitals.reduce(minOf(x => x.population), null)  // returns 657000\ncapitals.reduce(sumOf(x => x.population), null)  // returns 2351000\n```\n\n## Documentation\nFor more documentation, follow these links:\n- [min](./docs/min.md) for `minBy`, `minOf` and `min`\n- [max](./docs/max.md) for `maxBy`, `maxOf` and `max`\n- [sum](./docs/sum.md) for `sumOf` and `sum`\n\nAlso, look in the `tests` directory for more examples. The tests demonstrate at least another dozen different ways to use this library\n\n## Semantic versioning\nThis package follows semantic versioning (See [semver.org](https://semver.org) for more info)\n\n## License\nThis package is published under the MIT License. (See [LICENSE file](/LICENSE) for more info)\n","readmeFilename":"README.md"}