{"_id":"array-includes@3.2.0","bugs":{"url":"https://github.com/es-shims/array-includes/issues"},"dist":{"shasum":"18771e6837351aa139c3b58873371d0afa64964a","tarball":"http://registry-npm.ywwl.com/array-includes/download/array-includes-3.2.0.tgz","integrity":"sha512-VXY5eFRarnXcYxwBjJzPmEhH55+rmP79/+ueDhi0F+TuqfHCItagIHqxeUZrmgrOPa31QTh9H85DjX3FfJ0FTg==","fileCount":20,"unpackedSize":30980,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGjjNuBMq1Mt8jiKqY7bn6WppexEfkLjEqVwGl1RNhaFAiBadHNWlgH4XC1KIHH8rX8e6LkDa7MXiO6X2R4nZds52Q=="}],"size":10049,"noattachment":false,"key":"/array-includes/-/array-includes-3.2.0.tgz"},"main":"index.js","name":"array-includes","types":"./index.d.ts","author":{"url":"http://ljharb.codes","name":"Jordan Harband","email":"ljharb@gmail.com"},"engines":{"node":">= 0.4"},"funding":{"url":"https://github.com/sponsors/ljharb"},"gitHead":"f5f45e273bd273c44d844dc0e4f08546945ab84e","license":"MIT","scripts":{"lint":"eslint .","test":"npm run --silent tests-only","prelint":"evalmd --eslint README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run --silent lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"es-shim-api --bound && tsc -p . && attw -P","posttest":"npx npm@\">= 10.2\" audit --production","prepublish":"not-in-publish || npm run prepublishOnly","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"},"version":"3.2.0","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com","approver":{"name":"ljharb","email":"ljharb@gmail.com"}},"homepage":"https://github.com/es-shims/array-includes#readme","keywords":["Array.prototype.includes","includes","array","ES7","shim","polyfill","contains","Array.prototype.contains","es-shim API"],"testling":{"files":["test/index.js","test/implementation.js","test/shimmed.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2"]},"repository":{"url":"git://github.com/es-shims/array-includes.git","type":"git"},"_npmVersion":"11.19.0","description":"An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3.","directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_nodeVersion":"26.8.1","contributors":[{"url":"http://ljharb.codes","name":"Jordan Harband","email":"ljharb@gmail.com"}],"dependencies":{"call-bind":"^1.0.9","is-string":"^1.1.1","call-bound":"^1.0.4","es-abstract":"^1.24.2","es-object-atoms":"^1.1.2","math-intrinsics":"^1.1.0","define-properties":"^1.2.1","es-shim-unscopables":"^1.1.0"},"publishConfig":{"ignore":[".editorconfig",".github/workflows","eslint.config.mjs"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false,"startingVersion":"3.1.6"},"devDependencies":{"nyc":"^10.3.2","jiti":"^0.0.0","tape":"^5.10.2","eslint":"^10.10.0","evalmd":"^0.0.22","hasown":"^2.0.4","globals":"^17.12.0","npmignore":"^0.3.5","in-publish":"^2.0.1","typescript":"next","@es-shims/api":"^2.5.1","auto-changelog":"^2.6.1","has-strict-mode":"^1.1.0","@ljharb/tsconfig":"^0.3.2","safe-publish-latest":"^2.0.0","functions-have-names":"^1.2.3","@arethetypeswrong/cli":"^0.18.5","@ljharb/eslint-config":"^22.2.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/array-includes_3.2.0_1788993907057_0.13786677447904494"},"_hasShrinkwrap":false,"readme":"# array-includes <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 ES7/ES2016 spec-compliant `Array.prototype.includes` 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://262.ecma-international.org/6.0/).\n\nBecause `Array.prototype.includes` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument.\n\nEngines that need this package include:\n - IE (all versions)\n - Safari < 9\n - Firefox < 43, and 99-101\n - Chrome < 47\n - Edge < 14\n - node < 6\n\n## Getting started\n\n```sh\nnpm install --save array-includes\n```\n\n## Usage\n\nBasic usage: **includes(array, value[, fromIndex=0])**\n\n```js\nvar includes = require('array-includes');\nvar assert = require('assert');\nvar arr = [ 'one', 'two' ];\n\nincludes(arr, 'one'); // true\nincludes(arr, 'three'); // false\nincludes(arr, 'one', 1); // false\n```\n\n\n\n## Example\n\n```js\nvar arr = [\n\t1,\n\t'foo',\n\tNaN,\n\t-0\n];\n\nassert.equal(arr.indexOf(0) > -1, true);\nassert.equal(arr.indexOf(-0) > -1, true);\nassert.equal(includes(arr, 0), true);\nassert.equal(includes(arr, -0), true);\n\nassert.equal(arr.indexOf(NaN) > -1, false);\nassert.equal(includes(arr, NaN), true);\n\nassert.equal(includes(arr, 'foo', 0), true);\nassert.equal(includes(arr, 'foo', 1), true);\nassert.equal(includes(arr, 'foo', 2), false);\n```\n\n```js\n/* when Array#includes is not present */\ndelete Array.prototype.includes;\nvar shimmedIncludes = includes.shim();\n\nassert.equal(shimmedIncludes, includes.getPolyfill());\nassert.equal(arr.includes('foo', 1), includes(arr, 'foo', 1));\n```\n\n```js\n/* when Array#includes is present */\nvar shimmedIncludes = includes.shim();\n\nassert.equal(shimmedIncludes, Array.prototype.includes);\nassert.equal(arr.includes(1, 'foo'), includes(arr, 1, 'foo'));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/array-includes\n[npm-version-svg]: https://versionbadg.es/es-shims/array-includes.svg\n[deps-svg]: https://david-dm.org/es-shims/array-includes.svg\n[deps-url]: https://david-dm.org/es-shims/array-includes\n[dev-deps-svg]: https://david-dm.org/es-shims/array-includes/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/array-includes#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array-includes.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/array-includes.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/array-includes.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=array-includes\n[codecov-image]: https://codecov.io/gh/es-shims/array-includes/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/array-includes/\n[actions-image]: https://img.shields.io/github/check-runs/es-shims/array-includes/main\n[actions-url]: https://github.com/es-shims/array-includes/actions\n","publish_time":1788993907168,"_cnpm_publish_time":1788993907168,"dist-tags":{"latest":"3.2.0"}}