0.0.3 • Published 9 years ago

function-body-regex v0.0.3

Weekly downloads
12
License
MIT
Repository
github
Last release
9 years ago

function-body-regex

Build Status

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