function-body-regex
v0.0.3
Published
regex to rip off function body
Downloads
18
Readme
function-body-regex
function-body-regex is regex to rip off function body.
Example
var regex = require('function-body-regex');
var fn = function() {
console.log('this is function body.');
return true;
};
var ret = regex.exec(fn.toString());
console.log(ret[1]); // => '\nconsole.log(\'this is function body.\');\nreturn true;\n'
Installation
$ npm install function-body-regex
License
MIT