{"name":"babel-plugin-array-includes","version":"2.0.1","description":"Replaces `arr.includes(val)' with `arr.indexOf(val) >= 0`.","author":{"name":"Christoph Hermann"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/stoeffel/babel-plugin-array-includes.git"},"peerDependencies":{"babel-core":">=6.3.0"},"main":"lib/index.js","devDependencies":{"babel-cli":"^6.3.15","babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","chai":"^3.4.1","mocha":"^2.3.4"},"scripts":{"build":"babel -D src -d lib","test":"mocha","prepublish":"npm run build","patch-release":"npm version patch && npm publish && git push --follow-tags","minor-release":"npm version minor && npm publish && git push --follow-tags","major-release":"npm version major && npm publish && git push --follow-tags"},"keywords":["babel","babel-plugin","array","includes","polyfill"],"gitHead":"b23ab538315de1b539d025c5498fb51d369bd4cd","bugs":{"url":"https://github.com/stoeffel/babel-plugin-array-includes/issues"},"homepage":"https://github.com/stoeffel/babel-plugin-array-includes#readme","_id":"babel-plugin-array-includes@2.0.1","_shasum":"8505e39e97b3963221279e612ed9d283017198eb","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"schtoeffel","email":"schtoeffel@gmail.com"},"maintainers":[{"name":"schtoeffel","email":"schtoeffel@gmail.com"}],"dist":{"shasum":"8505e39e97b3963221279e612ed9d283017198eb","tarball":"http://registry-npm.ywwl.com/babel-plugin-array-includes/download/babel-plugin-array-includes-2.0.1.tgz","integrity":"sha512-Vt48/coxEE1741a8e7o80LhWPgTW/S6gTsBZO/zgruNHWUsRYTloAtwdmve+Qx4VCn0lP6Bgc+WsE34DnPaBpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTh/7nxPG8IoEmKwzZLGMkgWoNNAN4Fjr2b3MehVPJCAiEAgIXmjq9i1LSk7KNOVmS+Bi2LO6HhDHJyHnkLvMMgl4I="}],"size":2331,"noattachment":false,"key":"/babel-plugin-array-includes/-/babel-plugin-array-includes-2.0.1.tgz"},"directories":{},"readme":"# babel-plugin-array-includes\n\n> Replaces `arr.includes(val)` with `arr.indexOf(val) >= 0`.\n\nThanks to [@sebmck](https://github.com/sebmck) for the help.\n\n## Example\n\n**In**\n\n```javascript\n[1, 2, 3, 5, 8, 13].includes(4);\n```\n\n**Out**\n\n```javascript\n\"use strict\";\n\n[1, 2, 3, 5, 8, 13].indexOf(4) >= 0;\n```\n\n## Pitfalls\n\nThis doesn't work:\n\n**In**\n\n```js\nfunction foo(arr) {\n  return arr.includes('foo');\n}\n```\n\n**Out**\n\n```js\nfunction foo(arr) {\n  return arr.includes('foo'); // still includes\n}\n```\n\n## Installation\n\n```sh\n$ npm install babel-plugin-array-includes\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"array-includes\"]\n}\n```\n\n### Via CLI\n\n```sh\n$ babel --plugins array-includes script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"array-includes\"]\n});\n```\n","publish_time":1450421706938,"_cnpm_publish_time":1450421706938,"dist-tags":{"latest":"2.0.3"}}