function-body-regex

0.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i function-body-regex

Weekly Downloads

7

Version

0.0.3

License

MIT

Last publish

Collaborators

  • nulltask