Skip to content

Instantly share code, notes, and snippets.

@nyuichi
Created August 5, 2012 02:38
Show Gist options
  • Save nyuichi/3261210 to your computer and use it in GitHub Desktop.
Save nyuichi/3261210 to your computer and use it in GitHub Desktop.
JS2JSX translator regexp
_\(\w+\): function \(.+\) {$
function \1\2 {
\(\w+\): function \(.+\) {$
function \1\2 {
_function\s-
function _
$function
static function
},
}
var \(\w+\) = .* = \(\w+\)\.extend({$
class \1 extends \2 {
^});$
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment