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
// so named because why the hell not? | |
function banquo(func) { | |
var def = func.toString(); | |
// find the comma-delimeted list of parameters | |
var params = def.match(/\(\s*(\w+(\s*,\s*\w+)*)\s*\)/)[1].split(',').map(function (p) { | |
return p.trim(); | |
}); | |
// extract out just the function body |
NewerOlder