{"name":"array.prototype.push","version":"1.0.3","keywords":["Array.prototype.push","push","array","ES5","shim","polyfill","es-shim API"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"array.prototype.push@1.0.3","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/es-shims/Array.prototype.push#readme","bugs":{"url":"https://github.com/es-shims/Array.prototype.push/issues"},"dist":{"shasum":"52dc282924cd96b405d1cb4164f01f01da6f648d","tarball":"http://registry-npm.ywwl.com/array.prototype.push/download/array.prototype.push-1.0.3.tgz","fileCount":18,"integrity":"sha512-oFJY5zqd2Izh0mEyuAQYduuzjydpaSG3t9L2oepBZUjPlRr/sNd6jqKBt5xtR0ZEKsZkhCeBQecUK16uxfuRYA==","signatures":[{"sig":"MEUCIEQ46CT9BOJ6kpV8WyoYRr04VwsFCGkE/YrnV4yifttgAiEA7vU9fIGr3IcYDWmh8rRXoFuRs4eQY3wIgINajZpRvqg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23130,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZKJDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqjLg//QKdxM76+W/5SjjAaoO5KLPjqa4mWimTMDNnfOSmsWEglC5Wx\r\n2jdnahmPa2zm7ZSPrBbGSnKunfrYjFIxZ0lHRNB63J2/ujNYcd01i1040mHf\r\n0in1g4CD2I7Dn5E02tMhykcLPFpyqiKbhWfSqB9Lm0pnxSn+13EX/vbsJgb3\r\nrCpr7GAzVc2lNXOKVBw0TIfXkkBv6JG1W0+xVXAAAGx/OLEmNHjP5cLZrSlz\r\nJIbSR5wqGqrfXs0chN8zRZ3kjmyq7t03LvvF/VsLtjtJByp2VfUYhmsCt5hd\r\nGycxbmRpz/70who1PsMcQUsqCP1DLUAgQVQJ+u4B8iTxaIhETzsIpiOPbC4a\r\n0vFPpDaI+3KyPFfsSh/66Kt6DFTe6QQO+7wrIuX7nRAYA4ZUVDBJqBssSCnv\r\nKShVpjPHu95rXu6MnaRqsmRU1GU8gbZUTW8lEDL8ITW4HBD5Xn0ov8FzTkz8\r\n0nNoRSl0Tne2YeZTLy3IRbwQC7L4apQCv49X5gT9gzNDGbLFGvl9nFz/6/oM\r\nQ3h8JLLdrZ9O4C8FyTEZmKmidQ3NB/2InsIcyLYEDnNbbWh0lmo/bt+MJaRf\r\nkqhmr0M2ddNDsuqGAIm8SNAfANESC5WTQhbRVXfi0+SI1YXTt6douZgizOjQ\r\nWeJlCJtY5AuE5J9q1/DPnbrYjhhacL9nZZk=\r\n=rNvk\r\n-----END PGP SIGNATURE-----\r\n","size":7663,"noattachment":false,"key":"/array.prototype.push/-/array.prototype.push-1.0.3.tgz"},"main":"index.js","engines":{"node":">= 0.4"},"exports":{".":"./index.js","./auto":"./auto.js","./shim":"./shim.js","./polyfill":"./polyfill.js","./package.json":"./package.json","./implementation":"./implementation.js"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"4e0b8f6cdf07ecf7e866a072b71bbd59fc121c16","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"es-shim-api --bound","posttest":"aud --production","prepublish":"not-in-publish || npm run prepublishOnly","preversion":"auto-changelog","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/es-shims/Array.prototype.push.git","type":"git"},"_npmVersion":"8.19.2","description":"An ES spec-compliant `Array.prototype.push` shim/polyfill/replacement that works as far down as ES3.","directories":{},"_nodeVersion":"19.0.0","dependencies":{"call-bind":"^1.0.2","is-string":"^1.0.7","es-abstract":"^1.20.4","get-intrinsic":"^1.1.3","define-properties":"^1.1.4","has-property-descriptors":"^1.0.0"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"aud":"^2.0.1","has":"^1.0.3","nyc":"^10.3.2","tape":"^5.6.1","eslint":"=8.8.0","evalmd":"^0.0.19","npmignore":"^0.3.0","in-publish":"^2.0.1","@es-shims/api":"^2.2.3","auto-changelog":"^2.4.0","has-strict-mode":"^1.0.1","safe-publish-latest":"^2.0.0","functions-have-names":"^1.2.3","@ljharb/eslint-config":"^21.0.0"},"_npmOperationalInternal":{"tmp":"tmp/array.prototype.push_1.0.3_1667539523488_0.09433984645587334","host":"s3://npm-registry-packages"},"readme":"# array.prototype.push <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.push` 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.push).\n\nBecause `Array.prototype.push` depends on a receiver (the “this” value), the main export takes the array to operate on as the first argument.\n\n## Engines where this is needed\n\nNote: this list is not exhaustive.\n\n  - in node/chrome (including node 18-19): `push` fails to throw on a nonwritable `length` property\n  - IE 8 and below, and pre-ES6 engines: `deleteCount` isn't defaulted to `length - start` until ES6\n  - Safari 5.0: sometimes it returns `undefined`\n  - Safari 7/8: sparse arrays of size 1e5 or greater break\n  - Opera 12.15: breaks on small sparse arrays\n\n## Example\n\n```js\nvar push = require('array.prototype.push');\nvar assert = require('assert');\n\nvar a = [1, 1, 1];\nassert.equal(push(a, 1, 2), 5);\nassert.deepEqual(a, [1, 1, 1, 1, 2]);\n```\n\n```js\nvar push = require('array.prototype.push');\nvar assert = require('assert');\n/* when Array#push is not present */\ndelete Array.prototype.push;\nvar shimmed = push.shim();\nassert.equal(shimmed, push.getPolyfill());\nassert.equal(shimmed, Array.prototype.push);\nvar a = [1, 2, 3];\nvar b = [1, 2, 3];\nassert.equal(a.push(1, 2, 3), push(b, 1, 2, 3));\nassert.deepEqual(a, b);\n```\n\n```js\nvar push = require('array.prototype.push');\nvar assert = require('assert');\n/* when Array#push is present */\nvar shimmed = push.shim();\nassert.equal(shimmed, Array.prototype.push);\nassert.deepEqual([1, 2, 3].push(1, 2, 3), push([1, 2, 3], 1, 2, 3));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/array.prototype.push\n[npm-version-svg]: https://versionbadg.es/es-shims/Array.prototype.push.svg\n[deps-svg]: https://david-dm.org/es-shims/Array.prototype.push.svg\n[deps-url]: https://david-dm.org/es-shims/Array.prototype.push\n[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.push/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.push#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array.prototype.push.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/array.prototype.push.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/array.prototype.push.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=array.prototype.push\n[codecov-image]: https://codecov.io/gh/es-shims/Array.prototype.push/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Array.prototype.push/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Array.prototype.push\n[actions-url]: https://github.com/es-shims/Array.prototype.push/actions\n","publish_time":1667539523665,"_cnpm_publish_time":1667539523665,"dist-tags":{"latest":"1.0.7"}}