Last active
August 29, 2015 14:22
-
-
Save jtremback/55367f74b82e34f639ba to your computer and use it in GitHub Desktop.
es6 to commonJS module regexes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function (.*?) \((.*)\) | |
exports.\1 = \1\nfunction \1(\2) | |
import \* as (\w*) from ('.*') | |
var \1 = require(\2) | |
import (\{(.|\n)*?default as (.*)\}) from (.*) | |
var \3 = require(\4)\nvar \1 = \3 | |
\n *default as (.*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment