{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"2.2.0","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/thejameskyle/babel-helper-simplify-module.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","scripts":{"test":"jest"},"files":[],"dependencies":{"babel-explode-module":"^1.4.0"},"devDependencies":{"ast-pretty-print":"^1.3.0","babel-plugin-tester":"^3.0.0","babylon-options":"^1.1.2","flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"6a70e49e63ad8f3a9eacf987e1098dbbadc34ce2","bugs":{"url":"https://github.com/thejameskyle/babel-helper-simplify-module/issues"},"homepage":"https://github.com/thejameskyle/babel-helper-simplify-module#readme","_id":"babel-helper-simplify-module@2.2.0","_shasum":"62ccda7d379992eea9c1141400d1f63cd9918e16","_from":".","_npmVersion":"4.2.0","_nodeVersion":"8.0.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"62ccda7d379992eea9c1141400d1f63cd9918e16","tarball":"http://registry-npm.ywwl.com/babel-helper-simplify-module/download/babel-helper-simplify-module-2.2.0.tgz","integrity":"sha512-4MNmsPEdPY9n6lREYYKVs+VzLyjLz4q2zfdQGQ39H0Oi4fYn1rB/JEQ/lztIWgNbyF797ZyuGXMtDGxcY16KIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrR4HCfNXe2NAmXZ4w9m7jfsWKrAfxVG+lPnQupWC1EAiAplI3/QHpRlapHTO81JyWnyGXXtjy9limplST1V6vFfQ=="}],"size":2706,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.2.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module-2.2.0.tgz_1496373054154_0.6428125016391277"},"directories":{},"readme":"# babel-helper-simplify-module\n\n> Transform module using [babel-explode-module](https://github.com/babel-utils/babel-explode-module) to have a simpler structure\n\n```js\nimport {simplifyModule} from 'babel-helper-simplify-module';\n\nsimplifyModule(programPath);\n```\n\n**Before:**\n\n```js\nimport foo from \"mod\";\nimport {bar} from \"mod\";\n\nexport default function() {\n  // ...\n}\n\nexport const baz = 42,\n             bat = \"hello world\";\n\nexport * from \"bam\";\n```\n\n**After:**\n\n```js\nimport foo, {bar} from \"mod\";\n\nfunction _default() {\n  // ...\n}\n\nconst baz = 42;\nconst bat = \"hello world\";\n\nexport default _default;\nexport { baz };\nexport { bat };\nexport * from \"bam\";\n```\n\n## API\n\n### `explodedToStatements(exploded)`\n\n```js\nimport explodeModule from 'babel-explode-module';\nimport {explodedToStatements} from 'babel-helper-simplify-module';\n\nlet exploded = explodeModule(node);\nlet statements = explodedToStatements(exploded);\n```\n\n### `simplifyModule(path)`\n\n> This mutates the program.\n\n```js\nimport {simplifyModule} from 'babel-helper-simplify-module';\n\nsimplifyModule(programPath);\n```\n","publish_time":1496373054272,"_cnpm_publish_time":1496373054272,"dist-tags":{"latest":"2.2.1"}}