Created
July 21, 2017 16:48
-
-
Save garystorey/f46694a7fdf06f74f6545fba3ab2b176 to your computer and use it in GitHub Desktop.
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
(function(reComments, reParams, reNames) { | |
getParamNames = function(fn) { | |
return ((fn + '').replace(reComments, '').match(reParams) || [0, ''])[1].match(reNames) || []; | |
}; | |
})( | |
/\/\*[\s\S]*?\*\/|\/\/.*?[\r\n]/g, | |
/\(([\s\S]*?)\)/, | |
/[$\w]+/g | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment