{"name":"array.prototype.slice","version":"1.0.2","description":"ES spec-compliant `Array.prototype.slice` 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","preversion":"auto-changelog","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound","pretest":"npm run lint","test":"npm run tests-only","posttest":"aud --production","tests-only":"nyc tape 'test/**/*.js'","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.slice.git"},"keywords":["javascript","ecmascript","polyfill","shim","array","slice","Array.prototype.slice","ES5","es-shim API"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/Array.prototype.slice/issues"},"homepage":"https://github.com/es-shims/Array.prototype.slice#readme","engines":{"node":">= 0.4"},"devDependencies":{"@es-shims/api":"^2.4.2","@ljharb/eslint-config":"^21.1.0","aud":"^2.0.3","auto-changelog":"^2.4.0","eslint":"=8.8.0","evalmd":"^0.0.19","functions-have-names":"^1.2.3","has":"^1.0.3","has-strict-mode":"^1.0.1","has-symbols":"^1.0.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","is-string":"^1.0.7"},"testling":{"files":"test/*.js"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"array.prototype.slice@1.0.2","gitHead":"90cdfbb9f3124c07cb4c94b42e04393059f0caa7","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-zlMxExZsp2BE3wQIoMpu0zGHuJTLR+H2+noOJQwC7QH52iqSlW8ckQq526NphYEfprQLOPJ5jJqsVLkt4zaJ2g==","shasum":"eb98073252c3369582b881742b5621ca2fc9ee71","tarball":"http://registry-npm.ywwl.com/array.prototype.slice/download/array.prototype.slice-1.0.2.tgz","fileCount":17,"unpackedSize":18286,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4ZoJmBLiwHoGSMf6HO0kh30AOFU7lUjWAPiebSv6DCAIhANug0ljpMyJOGqeEGl3Pe3NNw5vIQyuOwRx6cvK2qRbr"}],"size":6553,"noattachment":false,"key":"/array.prototype.slice/-/array.prototype.slice-1.0.2.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.slice_1.0.2_1693424489212_0.7062231393134903"},"_hasShrinkwrap":false,"readme":"# array.prototype.slice <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.slice` 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.slice).\n\nBecause `Array.prototype.slice` 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  - Safari 10 - 13\n  - Chrome 48+ ([v8 bug](https://bugs.chromium.org/p/v8/issues/detail?id=10381))\n  - node 6+\n\n## Example\n\n```js\nvar slice = require('array.prototype.slice');\nvar assert = require('assert');\n\nvar a = [1, 2, 3];\nassert.deepEqual(slice(a, 1, 2), [2]);\nassert.deepEqual(slice(a, -2), [2, 3]);\n```\n\n```js\nvar slice = require('array.prototype.slice');\nvar assert = require('assert');\n/* when Array#slice is not present */\ndelete Array.prototype.slice;\nvar shimmed = slice.shim();\nassert.equal(shimmed, slice.getPolyfill());\nassert.equal(shimmed, Array.prototype.slice);\nassert.deepEqual([1, 2, 3].slice(1, 2), slice([1, 2, 3], 1, 2));\n```\n\n```js\nvar slice = require('array.prototype.slice');\nvar assert = require('assert');\n/* when Array#slice is present */\nvar shimmed = slice.shim();\nassert.equal(shimmed, Array.prototype.slice);\nassert.deepEqual([1, 2, 3].slice(1, 2), slice([1, 2, 3], 1, 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.slice\n[npm-version-svg]: https://versionbadg.es/es-shims/Array.prototype.slice.svg\n[deps-svg]: https://david-dm.org/es-shims/Array.prototype.slice.svg\n[deps-url]: https://david-dm.org/es-shims/Array.prototype.slice\n[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.slice/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.slice#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array.prototype.slice.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/array.prototype.slice.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/array.prototype.slice.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=array.prototype.slice\n[codecov-image]: https://codecov.io/gh/es-shims/Array.prototype.slice/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Array.prototype.slice/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Array.prototype.slice\n[actions-url]: https://github.com/es-shims/Array.prototype.slice/actions\n","publish_time":1693424489394,"_cnpm_publish_time":1693424489394,"dist-tags":{"latest":"1.0.3"}}