{"name":"babel-plugin-transform-async-to-module-method","version":"6.0.2","description":"Turn async functions into a module method","repository":{"type":"git","url":"git+https://github.com/babel/babel.git"},"license":"MIT","main":"lib/index.js","keywords":["babel-plugin"],"dependencies":{"babel-plugin-syntax-async-functions":"^6.0.2","babel-helper-remap-async-to-generator":"^6.0.2","babel-types":"^6.0.2","babel-runtime":"^6.0.2"},"bugs":{"url":"https://github.com/babel/babel/issues"},"homepage":"https://github.com/babel/babel#readme","_id":"babel-plugin-transform-async-to-module-method@6.0.2","scripts":{},"_shasum":"c32c767a9ac8cf03201ea57f58affdc0a42e8124","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"sebmck","email":"sebmck@gmail.com"},"dist":{"shasum":"c32c767a9ac8cf03201ea57f58affdc0a42e8124","tarball":"http://registry-npm.ywwl.com/babel-plugin-transform-async-to-module-method/download/babel-plugin-transform-async-to-module-method-6.0.2.tgz","integrity":"sha512-jIkRCn0XW4BUp7J7OaN4UKM78rlbWGnfILVErxa2Sa7z8Ez2MNB0lWKuZ+DmeR68jhk+UfDg7lzuzYKAM6uukQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBNX/wNTCQ+MyweFpCF/KNlMk67Ow/NO/4vzfDHpu2O5AiBYJk7uXjSGYACITzCnkAj2ZOa2yXR1SlG9LzMhdSauvA=="}],"size":1437,"noattachment":false,"key":"/babel-plugin-transform-async-to-module-method/-/babel-plugin-transform-async-to-module-method-6.0.2.tgz"},"maintainers":[{"name":"sebmck","email":"sebmck@gmail.com"}],"directories":{},"readme":"# babel-plugin-transform-async-to-module-method\n\n> Turn async functions into a Bluebird coroutine\n\n## Example\n\n**In**\n\n```javascript\nasync function foo() {\n  await bar();\n}\n```\n\n**Out**\n\n```javascript\nvar Bluebird = require(\"bluebird\");\n\nvar foo = Bluebird.coroutine(function* () {\n  yield bar();\n});\n```\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-async-to-module-method\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\nWithout options:\n\n```json\n{\n  \"plugins\": [\"transform-async-to-module-method\"]\n}\n```\n\nWith options:\n\n```json\n{\n  \"plugins\": [\n    [\"transform-async-to-module-method\", {\n      \"module\": \"bluebird\",\n      \"method\": \"coroutine\"\n    }]\n  ]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins transform-async-to-module-method script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"transform-async-to-module-method\"]\n});\n```\n","publish_time":1446142343779,"_cnpm_publish_time":1446142343779,"dist-tags":{"latest":"6.24.1","next":"7.0.0-beta.3"}}