{"name":"babel-plugin-array-includes","version":"2.0.2","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":"232772e104c4f1393db4a7ebad75419af6b8967b","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.2","_shasum":"f114bef73220f4b494c8413869a0a82074abf9d6","_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":"f114bef73220f4b494c8413869a0a82074abf9d6","tarball":"http://registry-npm.ywwl.com/babel-plugin-array-includes/download/babel-plugin-array-includes-2.0.2.tgz","integrity":"sha512-g5qbGucWtOnSmkfSw4+rBcWvyzvOnfISSSOszSf7fDFWNMjyDZEAqRkc0Pd0SgspNAgGryvhAN4YBFl8yUppJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2bUgFxByKNpdp/h4iDuf7SAjsWFHh4D09yzA3uXwRggIgPMksrol+8gZaQQeqk6vE7CaerIxmkCG1cKXCH7eTy6k="}],"size":2273,"noattachment":false,"key":"/babel-plugin-array-includes/-/babel-plugin-array-includes-2.0.2.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":1450421853656,"_cnpm_publish_time":1450421853656,"dist-tags":{"latest":"2.0.3"}}