{"name":"babel-plugin-array-includes","version":"1.1.0","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":">=5.2.0"},"main":"lib/index.js","devDependencies":{"babel":"^5.6.0"},"scripts":{"build":"babel-plugin build","push":"babel-plugin publish","test":"babel-plugin test"},"keywords":["babel","babel-plugin","array","includes","polyfill"],"gitHead":"c50e4dd2f89749ce09838cbe5013272ab50e36eb","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@1.1.0","_shasum":"3dcbd6a905776caf9835526dbb4cf55719da99e9","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"schtoeffel","email":"schtoeffel@gmail.com"},"maintainers":[{"name":"schtoeffel","email":"schtoeffel@gmail.com"}],"dist":{"shasum":"3dcbd6a905776caf9835526dbb4cf55719da99e9","tarball":"http://registry-npm.ywwl.com/babel-plugin-array-includes/download/babel-plugin-array-includes-1.1.0.tgz","integrity":"sha512-E3F+XIbyThhVGwHqx7YZhTFqdnhuWNYg564/zT26KALa5vElHExQ+cLGlvm488TQUByj4jjaOupMYBhDjqXWxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGS85WpCRQSlO6JYBKuoWolhvG8Fhlzv41rxlE19BM4ZAiAV/7Sh8LKBLEmUOqAbKm959BrFZyluTATr4mJ6/QZFkw=="}],"size":1954,"noattachment":false,"key":"/babel-plugin-array-includes/-/babel-plugin-array-includes-1.1.0.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":1435161691356,"_cnpm_publish_time":1435161691356,"dist-tags":{"latest":"2.0.3"}}