{"name":"array.prototype.foreach","version":"1.0.0","description":"An ESnext spec-compliant `Array.prototype.forEach` shim/polyfill/replacement that works as far down as ES3.","author":{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"},"funding":{"url":"https://github.com/sponsors/ljharb"},"contributors":[{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"}],"license":"MIT","bugs":{"url":"https://github.com/es-shims/Array.prototype.forEach/issues"},"homepage":"https://github.com/es-shims/Array.prototype.forEach#readme","main":"index.js","exports":{".":[{"import":"./index.mjs","require":"./index.js","default":"./index.js"},"./index.js"],"./auto":[{"import":"./auto.mjs","require":"./auto.js","default":"./auto.js"},"./auto.js"],"./implementation":[{"import":"./implementation.mjs","require":"./implementation.js","default":"./implementation.js"},"./implementation.js"],"./polyfill":[{"import":"./polyfill.mjs","require":"./polyfill.js","default":"./polyfill.js"},"./polyfill.js"],"./shim":[{"import":"./shim.mjs","require":"./shim.js","default":"./shim.js"},"./shim.js"],"./package.json":"./package.json"},"scripts":{"prepublish":"safe-publish-latest","pretest":"npm run --silent lint && evalmd README.md","posttest":"aud --production","tests-only":"nyc tape 'test/**/*.js'","tests-esm":"nyc node test/index.mjs","test":"npm run tests-only && npm run tests-esm","lint":"eslint .","postlint":"es-shim-api --bound","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/Array.prototype.forEach.git"},"keywords":["Array.prototype.forEach","forEach","array","ESnext","shim","polyfill","es-shim API"],"dependencies":{"call-bind":"^1.0.2","define-properties":"^1.1.3","es-abstract":"^1.18.5","es-array-method-boxes-properly":"^1.0.0","get-intrinsic":"^1.1.1","is-string":"^1.0.7"},"devDependencies":{"@es-shims/api":"^2.1.2","@ljharb/eslint-config":"^17.6.0","aud":"^1.1.5","auto-changelog":"^2.3.0","eslint":"^7.32.0","evalmd":"^0.0.19","functions-have-names":"^1.2.2","has-strict-mode":"^1.0.1","nyc":"^10.3.2","safe-publish-latest":"^1.1.4","tape":"^5.3.1"},"testling":{"files":["test/index.js","test/implementation.js","test/shimmed.js"]},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"696d9aa8f79e8edf31785817868ab5b75082c56b","_id":"array.prototype.foreach@1.0.0","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-412sj+oVoiV6p1IU39HNudfcrSo2FZMyp0FCCu1G7W+5ekc9MQT6ltn5a4qEwuYoRcNShRR3+jl/12FqW3gV4w==","shasum":"8de5b29d872780ddf7bca1bfef3d0cb1d41c102e","tarball":"http://registry-npm.ywwl.com/array.prototype.foreach/download/array.prototype.foreach-1.0.0.tgz","fileCount":24,"unpackedSize":22280,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDu9JCRA9TVsSAnZWagAA8eUQAI1JkFVh4IZV8mJqktwC\nR5o5FPmpvJIGpohQpIL73HECM4veagXHyxZgxTqTtfJcUKRYEjmTphMxSYDt\nnL4FVQp5ZDB7tnTJHqdcq++8lnmsquj6Di0HwHIbCXiso6ROsSrQ2C6feHUG\nIL7j3hT51eoxhkhRM+e3+4y87sIsRGHJtMHFI1AlG9OEEDHYrxTplX7fcNo3\nplZu8bpyeYuBagBEvZNr+uHqSNwjpxAFUd1kOY4yu73ZsgchvTPvNyxg5rJ8\nICLIecLLt6GAJ/EtdViPyIlxvDbmBixeeXP+aURpZQsPqcK/tahPMjhS5+TZ\nE08/50rOZ5JQG3jO0aJNUKeWfAM3XNS9l7f4jHzpR+s3sZGIHoIvXp4zdglW\nf245Hi+vp+gNtrpAKEcDoHiKxXrZHbn2XJQRGOEHh4Sm2/sdzifah4DSQWgc\nOL8jCqRfoOIlR2bcJGiBi10dASTkEFv4r342ebNmfuKuV/0w5yiXGudVvuGu\nZB8YZmDn4T2jboMPM793HK1SV7uJPTS8liQvQkamUNdTwYTPeT0UjVUA9l8Z\n9EIpgcySNjYi6/PILIFerp4JYjDEA4TOXvN4frYtBBcvZVcluqWZWbhkjyGD\nB6O1/YN6NhqcMSN4p+bBnNwUpWm4PsjeVNuks87fL0mNtGhzDGO0UXfd4JH6\nJh9R\r\n=JtWE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEDsGVpeEhME2vf0nnacrGCJG12QgBHpplaFhXOEwgz0AiEAjVzsXt1a3ep4Le8Vz1FH4kJMAG35ZZvfTnFbL8LKL/8="}],"size":7311,"noattachment":false,"key":"/array.prototype.foreach/-/array.prototype.foreach-1.0.0.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array.prototype.foreach_1.0.0_1628368713719_0.7110192302573966"},"_hasShrinkwrap":false,"readme":"# array.prototype.foreach <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ES spec-compliant `Array.prototype.forEach` 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 [spec](https://tc39.es/ecma262/#sec-array.prototype.foreach).\n\nBecause `Array.prototype.forEach` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument.\n\n## Getting started\n\n```sh\nnpm install --save array.prototype.foreach\n```\n\n## Usage/Examples\n\n```js\nvar forEach = require('array.prototype.foreach');\nvar assert = require('assert');\n\nvar arr = [1, [2], [], 3, [[4]]];\nvar counter = 0;\nvar increaseCounter = function (x) { counter += 1; };\n\nassert.equal(forEach(arr, increaseCounter), undefined);\nassert.equal(counter, arr.length);\n```\n\n```js\nvar forEach = require('array.prototype.foreach');\nvar assert = require('assert');\n/* when Array#forEach is not present */\ndelete Array.prototype.forEach;\nvar shimmed = forEach.shim();\nvar counter = 0;\n\nassert.equal(shimmed, forEach.getPolyfill());\nassert.equal(arr.forEach(increaseCounter), forEach(arr, increaseCounter));\nassert.equal(counter, arr.length * 2);\n```\n\n```js\nvar forEach = require('array.prototype.foreach');\nvar assert = require('assert');\n/* when Array#forEach is present */\nvar shimmed = forEach.shim();\nvar counter = 0;\n\nassert.equal(shimmed, Array.prototype.forEach);\nassert.equal(arr.forEach(increaseCounter), forEach(arr, increaseCounter));\nassert.equal(counter, arr.length * 2);\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/array.prototype.foreach\n[npm-version-svg]: https://versionbadg.es/es-shims/Array.prototype.forEach.svg\n[deps-svg]: https://david-dm.org/es-shims/Array.prototype.forEach.svg\n[deps-url]: https://david-dm.org/es-shims/Array.prototype.forEach\n[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.forEach/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.forEach#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array.prototype.foreach.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/array.prototype.foreach.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/array.prototype.foreach.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=array.prototype.foreach\n[codecov-image]: https://codecov.io/gh/es-shims/Array.prototype.forEach/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Array.prototype.forEach/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Array.prototype.forEach\n[actions-url]: https://github.com/es-shims/Array.prototype.forEach\n","publish_time":1628368713837,"_cnpm_publish_time":1628368713837,"dist-tags":{"latest":"1.0.7"}}