{"_id":"object.groupby","_rev":"286935","name":"object.groupby","description":"An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"ljharb","email":""}],"time":{"modified":"2023-09-20T22:01:24.000Z","created":"2023-07-11T16:42:17.109Z","1.0.1":"2023-08-28T16:54:02.565Z","1.0.0":"2023-07-11T16:42:17.109Z"},"users":{},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/es-shims/Object.groupBy.git"},"versions":{"1.0.1":{"name":"object.groupby","version":"1.0.1","description":"An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.","main":"index.js","exports":{".":"./index.js","./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run --silent lint","test":"npm run tests-only","posttest":"aud --production","tests-only":"nyc tape 'test/**/*.js'","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound && evalmd README.md","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/es-shims/Object.groupBy.git"},"keywords":["ecmascript","javascript","polyfill","shim","es-shim API","array","object","group","groupBy"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/Object.groupBy/issues"},"homepage":"https://github.com/es-shims/Object.groupBy#readme","devDependencies":{"@es-shims/api":"^2.4.2","@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","functions-have-names":"^1.2.3","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.6.6"},"dependencies":{"call-bind":"^1.0.2","define-properties":"^1.2.0","es-abstract":"^1.22.1","get-intrinsic":"^1.2.1"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"object.groupby@1.0.1","gitHead":"66a3c2f40cc8442391fb6afcb2a7b239852390ed","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"shasum":"d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee","size":6354,"noattachment":false,"key":"/object.groupby/-/object.groupby-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/object.groupby/download/object.groupby-1.0.1.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/object.groupby_1.0.1_1693241642345_0.18626710387561474"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-28T16:54:02.565Z","publish_time":1693241642565,"_source_registry_name":"default","_cnpm_publish_time":1693241642565},"1.0.0":{"name":"object.groupby","version":"1.0.0","description":"An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.","main":"index.js","exports":{".":"./index.js","./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run --silent lint","test":"npm run tests-only","posttest":"aud --production","tests-only":"nyc tape 'test/**/*.js'","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound && evalmd README.md","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/es-shims/Object.groupBy.git"},"keywords":["ecmascript","javascript","polyfill","shim","es-shim API","array","object","group","groupBy"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/Object.groupBy/issues"},"homepage":"https://github.com/es-shims/Object.groupBy#readme","devDependencies":{"@es-shims/api":"^2.4.2","@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","es-value-fixtures":"^1.4.2","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","functions-have-names":"^1.2.3","in-publish":"^2.0.1","npmignore":"^0.3.0","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","tape":"^5.6.4"},"dependencies":{"call-bind":"^1.0.2","define-properties":"^1.2.0","es-abstract":"^1.21.2","get-intrinsic":"^1.2.1"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"gitHead":"78eb764e3cfa679615a64bf9fbd5177c010ef9fe","_id":"object.groupby@1.0.0","_nodeVersion":"20.4.0","_npmVersion":"9.7.2","dist":{"shasum":"cb29259cf90f37e7bac6437686c1ea8c916d12a9","size":7082,"noattachment":false,"key":"/object.groupby/-/object.groupby-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/object.groupby/download/object.groupby-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/object.groupby_1.0.0_1689093736948_0.5542635227019541"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-07-11T16:42:17.109Z","publish_time":1689093737109,"_source_registry_name":"default","_cnpm_publish_time":1689093737109}},"readme":"# object.groupby <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](https://tc39.github.io/proposal-array-grouping/).\n\n## Getting started\n\n```sh\nnpm install --save object.groupby\n```\n\n## Usage/Examples\n\n```js\nvar groupBy = require('object.groupby');\nvar assert = require('assert');\n\nvar arr = [0, 1, 2, 3, 4, 5];\nvar parity = function (x) { return x % 2 === 0 ? 'even' : 'odd'; };\n\nvar results = groupBy(arr, function (x, i) {\n    assert.equal(x, arr[i]);\n    return parity(x);\n});\n\nassert.deepEqual(results, {\n    __proto__: null,\n    even: [0, 2, 4],\n    odd: [1, 3, 5],\n});\n```\n\n```js\nvar groupBy = require('object.groupby');\nvar assert = require('assert');\n/* when Object.groupBy is not present */\ndelete Object.groupBy;\nvar shimmed = groupBy.shim();\n\nassert.equal(shimmed, groupBy.getPolyfill());\nassert.deepEqual(Object.groupBy(arr, parity), groupBy(arr, parity));\n```\n\n```js\nvar groupBy = require('object.groupby');\nvar assert = require('assert');\n/* when Array#group is present */\nvar shimmed = groupBy.shim();\n\nassert.equal(shimmed, Object.groupBy);\nassert.deepEqual(Object.groupBy(arr, parity), groupBy(arr, parity));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/object.groupby\n[npm-version-svg]: https://versionbadg.es/es-shims/Object.groupBy.svg\n[deps-svg]: https://david-dm.org/es-shims/Object.groupBy.svg\n[deps-url]: https://david-dm.org/es-shims/Object.groupBy\n[dev-deps-svg]: https://david-dm.org/es-shims/Object.groupBy/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Object.groupBy#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/object.groupby.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/object.groupby.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/object.groupby.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=object.groupby\n[codecov-image]: https://codecov.io/gh/es-shims/Object.groupBy/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Object.groupBy/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.groupBy\n[actions-url]: https://github.com/es-shims/Object.groupBy/actions\n","_attachments":{},"homepage":"https://github.com/es-shims/Object.groupBy#readme","bugs":{"url":"https://github.com/es-shims/Object.groupBy/issues"},"license":"MIT"}