{"name":"array.prototype.slice","version":"1.0.3","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.4","auto-changelog":"^2.4.0","eslint":"=8.8.0","evalmd":"^0.0.19","functions-have-names":"^1.2.3","has-strict-mode":"^1.0.1","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","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","es-object-atoms":"^1.0.0","get-intrinsic":"^1.2.4","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.3","gitHead":"0d68eaa3e80072365756e098e97e40886c8dc700","_nodeVersion":"21.7.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-mBqKR+J5OMJd+CxH1KcyddtIHoci1aKTK23QWVScR/+1JvETDwZIadxMP1ynZa+InvPwcGV+THC0y2hHxwoO7g==","shasum":"c81c5c6ba1f3ae512d5ec5feb83a8b9294a6a4b7","tarball":"http://registry-npm.ywwl.com/array.prototype.slice/download/array.prototype.slice-1.0.3.tgz","fileCount":17,"unpackedSize":19222,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrlYx5UQWyFF84VJ0K5DGD+nmcXmKit2SoI4wN0wmi1wIgAZdw0ziq4sDZbOFtlAq7Or8k43CZRFRzAT5IIU8Ymwk="}],"size":6873,"noattachment":false,"key":"/array.prototype.slice/-/array.prototype.slice-1.0.3.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.3_1710996834986_0.3457127629231673"},"_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":1710996835127,"_cnpm_publish_time":1710996835127,"dist-tags":{"latest":"1.0.3"}}