{"_id":"babel-helper-simplify-module","_rev":"3942638","name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","dist-tags":{"latest":"2.2.1"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2025-09-01T01:32:17.000Z","created":"2017-05-25T17:30:29.307Z","2.2.1":"2018-08-17T02:43:19.336Z","2.2.0":"2017-06-02T03:10:54.272Z","2.1.2":"2017-05-30T00:48:05.890Z","2.1.1":"2017-05-29T23:36:30.071Z","2.1.0":"2017-05-25T18:58:43.678Z","2.0.0":"2017-05-25T17:43:22.829Z","1.0.0":"2017-05-25T17:30:29.307Z"},"users":{},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/thejameskyle/babel-helper-simplify-module.git"},"versions":{"2.2.1":{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"2.2.1","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":"d4880c08715b84a1836d1c25303a9c48b0e691b2","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.1","_npmVersion":"6.1.0","_nodeVersion":"10.7.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"54cf5b2f7930eef638458b2eaaeeacfbafa3842c","size":2175,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/babel-helper-simplify-module-2.2.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module_2.2.1_1534473799224_0.6389730933151205"},"_hasShrinkwrap":false,"publish_time":1534473799336,"_cnpm_publish_time":1534473799336,"_cnpmcore_publish_time":"2021-12-16T16:27:40.604Z"},"2.2.0":{"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","size":2706,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/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":{},"publish_time":1496373054272,"_hasShrinkwrap":false,"_cnpm_publish_time":1496373054272,"_cnpmcore_publish_time":"2021-12-16T16:27:40.836Z"},"2.1.2":{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"2.1.2","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.3.2"},"devDependencies":{"babel-plugin-tester":"^3.0.0","babylon-options":"^1.1.2","flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"7f2908e6cef3dfeab49877b6c2c50f8d9de1fd02","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.1.2","_shasum":"5f40593a1ca6ffdc3d2ed5550b39f967e714610c","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"5f40593a1ca6ffdc3d2ed5550b39f967e714610c","size":2700,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/babel-helper-simplify-module-2.1.2.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module-2.1.2.tgz_1496105285681_0.3994398710783571"},"directories":{},"publish_time":1496105285890,"_hasShrinkwrap":false,"_cnpm_publish_time":1496105285890,"_cnpmcore_publish_time":"2021-12-16T16:27:41.072Z"},"2.1.1":{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"2.1.1","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.2.0"},"devDependencies":{"babel-plugin-tester":"^3.0.0","babylon-options":"^1.1.2","flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"5392f40132e212a222502b33f0ed790508b7f4d2","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.1.1","_shasum":"bf13c70d077caf64ff99c9fe26f5d4becc69a5cf","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"bf13c70d077caf64ff99c9fe26f5d4becc69a5cf","size":2723,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/babel-helper-simplify-module-2.1.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module-2.1.1.tgz_1496100989981_0.4887971356511116"},"directories":{},"publish_time":1496100990071,"_hasShrinkwrap":false,"_cnpm_publish_time":1496100990071,"_cnpmcore_publish_time":"2021-12-16T16:27:41.275Z"},"2.1.0":{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"2.1.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"},"dependencies":{"babel-explode-module":"^1.2.0"},"devDependencies":{"babel-plugin-tester":"^3.0.0","babylon-options":"^1.1.2","flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"820dc44b5647db98b4a19aacaffebe6a47cb861e","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.1.0","_shasum":"1e7f1b7bd385fb58042e9b39c3f64bf270537db4","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"1e7f1b7bd385fb58042e9b39c3f64bf270537db4","size":23549,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/babel-helper-simplify-module-2.1.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module-2.1.0.tgz_1495738723573_0.7052198764868081"},"directories":{},"publish_time":1495738723678,"_hasShrinkwrap":false,"_cnpm_publish_time":1495738723678,"_cnpmcore_publish_time":"2021-12-16T16:27:41.488Z"},"2.0.0":{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"2.0.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"},"dependencies":{"babel-explode-module":"^1.1.0"},"devDependencies":{"babel-plugin-tester":"^3.0.0","babylon-options":"^1.1.2","flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"a85ea2a601fb0e545f31d4f6b9f26403e45590b0","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.0.0","_shasum":"9acf7d18d7d64df66b88ec8bb6041e85dccb966d","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"9acf7d18d7d64df66b88ec8bb6041e85dccb966d","size":23467,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/babel-helper-simplify-module-2.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module-2.0.0.tgz_1495734202691_0.9457686576060951"},"directories":{},"publish_time":1495734202829,"_hasShrinkwrap":false,"_cnpm_publish_time":1495734202829,"_cnpmcore_publish_time":"2021-12-16T16:27:42.154Z"},"1.0.0":{"name":"babel-helper-simplify-module","description":"Transform module using babel-explode-module to have a simpler structure","version":"1.0.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"},"dependencies":{"babel-explode-module":"^1.1.0"},"devDependencies":{"babel-plugin-tester":"^3.0.0","babylon-options":"^1.1.2","flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"806eb62a91a89814677529961c08e13178f19fbd","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@1.0.0","_shasum":"349aa5606f58301fc870ce87433ca13eff0b01bd","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"349aa5606f58301fc870ce87433ca13eff0b01bd","size":23356,"noattachment":false,"key":"/babel-helper-simplify-module/-/babel-helper-simplify-module-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-helper-simplify-module/download/babel-helper-simplify-module-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-helper-simplify-module-1.0.0.tgz_1495733429174_0.5852855455596"},"directories":{},"publish_time":1495733429307,"_hasShrinkwrap":false,"_cnpm_publish_time":1495733429307,"_cnpmcore_publish_time":"2021-12-16T16:27:42.448Z"}},"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","_attachments":{},"homepage":"https://github.com/thejameskyle/babel-helper-simplify-module#readme","bugs":{"url":"https://github.com/thejameskyle/babel-helper-simplify-module/issues"},"license":"MIT"}