{
  "_id": "object.groupby",
  "maintainers": [
    {
      "name": "ljharb",
      "email": "ljharb@gmail.com"
    }
  ],
  "keywords": [
    "ecmascript",
    "javascript",
    "polyfill",
    "shim",
    "es-shim API",
    "array",
    "object",
    "group",
    "groupBy"
  ],
  "dist-tags": {
    "latest": "1.0.3"
  },
  "author": {
    "name": "Jordan Harband",
    "email": "ljharb@gmail.com"
  },
  "_rev": "3-2be96d03cfe9c836d49fca4c46479bff",
  "description": "An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.",
  "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",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/es-shims/Object.groupBy.git"
  },
  "bugs": {
    "url": "https://github.com/es-shims/Object.groupBy/issues"
  },
  "license": "MIT",
  "versions": {
    "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": {
        "integrity": "sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==",
        "shasum": "cb29259cf90f37e7bac6437686c1ea8c916d12a9",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/object.groupby/-/object.groupby-1.0.0.tgz",
        "fileCount": 21,
        "unpackedSize": 20252,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIGqJrN5tU+CVSJjlCQVj1KW6/NLdQYTTchepuc1+f53VAiEAjO9yf+oABuHYgg2nAkZtIqcRD6BdjCXkBsgaGjabnrg="
          }
        ]
      },
      "_npmUser": {
        "name": "ljharb",
        "email": "ljharb@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "ljharb",
          "email": "ljharb@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/object.groupby_1.0.0_1689093736948_0.5542635227019541"
      },
      "_hasShrinkwrap": false
    },
    "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": {
        "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==",
        "shasum": "d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/object.groupby/-/object.groupby-1.0.1.tgz",
        "fileCount": 18,
        "unpackedSize": 16826,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIFOmMuDKYK4cnZ9RlyqBLxxQgAIYqfYkr3rmT/fXXT4qAiBCUCdCIdD3d8T0kZvUodrVbSFSRqQ22uNdOm8JPplHng=="
          }
        ]
      },
      "_npmUser": {
        "name": "ljharb",
        "email": "ljharb@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "ljharb",
          "email": "ljharb@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/object.groupby_1.0.1_1693241642345_0.18626710387561474"
      },
      "_hasShrinkwrap": false
    },
    "1.0.2": {
      "name": "object.groupby",
      "version": "1.0.2",
      "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.4",
        "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.1",
        "nyc": "^10.3.2",
        "safe-publish-latest": "^2.0.0",
        "tape": "^5.7.4"
      },
      "dependencies": {
        "array.prototype.filter": "^1.0.3",
        "call-bind": "^1.0.5",
        "define-properties": "^1.2.1",
        "es-abstract": "^1.22.3",
        "es-errors": "^1.0.0"
      },
      "auto-changelog": {
        "output": "CHANGELOG.md",
        "template": "keepachangelog",
        "unreleased": false,
        "commitLimit": false,
        "backfillLimit": false,
        "hideCredit": true
      },
      "publishConfig": {
        "ignore": [
          ".github/workflows"
        ]
      },
      "_id": "object.groupby@1.0.2",
      "gitHead": "cb42422fc7ddab7c1df2036b359d50c079d8302b",
      "_nodeVersion": "21.6.0",
      "_npmVersion": "10.2.4",
      "dist": {
        "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==",
        "shasum": "494800ff5bab78fd0eff2835ec859066e00192ec",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/object.groupby/-/object.groupby-1.0.2.tgz",
        "fileCount": 18,
        "unpackedSize": 17568,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQDItkFEkm+DJaOsX2UlmtRcY59WaIFNHUL9QnlTtVRFugIhAPFlvHGJtRsxajKdDfuJxnjSLqorf3ZAnOLHvOa2hJqm"
          }
        ]
      },
      "_npmUser": {
        "name": "ljharb",
        "email": "ljharb@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "ljharb",
          "email": "ljharb@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/object.groupby_1.0.2_1707115488657_0.496115059173037"
      },
      "_hasShrinkwrap": false
    },
    "1.0.3": {
      "name": "object.groupby",
      "version": "1.0.3",
      "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.4",
        "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.1",
        "nyc": "^10.3.2",
        "object-inspect": "^1.13.1",
        "safe-publish-latest": "^2.0.0",
        "tape": "^5.7.5"
      },
      "dependencies": {
        "call-bind": "^1.0.7",
        "define-properties": "^1.2.1",
        "es-abstract": "^1.23.2"
      },
      "auto-changelog": {
        "output": "CHANGELOG.md",
        "template": "keepachangelog",
        "unreleased": false,
        "commitLimit": false,
        "backfillLimit": false,
        "hideCredit": true
      },
      "publishConfig": {
        "ignore": [
          ".github/workflows"
        ]
      },
      "engines": {
        "node": ">= 0.4"
      },
      "_id": "object.groupby@1.0.3",
      "gitHead": "2440f818b02bb49721e43360786f0ad6049c55ea",
      "_nodeVersion": "21.7.0",
      "_npmVersion": "10.5.0",
      "dist": {
        "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
        "shasum": "9b125c36238129f6f7b61954a1e7176148d5002e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/object.groupby/-/object.groupby-1.0.3.tgz",
        "fileCount": 16,
        "unpackedSize": 14579,
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIE3xQhE1gtDIQm2HdAGqW4ih9bCrWYBX68KsURMHReFJAiEA0BAkzQDN0Xnlx3MBy0B7krF9vrUGslwjaXPZus79Oss="
          }
        ]
      },
      "_npmUser": {
        "name": "ljharb",
        "email": "ljharb@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "ljharb",
          "email": "ljharb@gmail.com"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/object.groupby_1.0.3_1710785053498_0.1430938002772455"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "object.groupby",
  "time": {
    "created": "2023-07-11T16:42:16.947Z",
    "1.0.0": "2023-07-11T16:42:17.109Z",
    "modified": "2026-05-13T06:55:01.968Z",
    "1.0.1": "2023-08-28T16:54:02.565Z",
    "1.0.2": "2024-02-05T06:44:48.814Z",
    "1.0.3": "2024-03-18T18:04:13.675Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/es-shims/Object.groupBy#readme"
}