innersource

Returns inner source of a function as a string.

innersource

Returns inner source (the body) of a function as a string.

$ npm install innersource
var innersource = require('innersource');
 
function test1() {
  console.log('hello');
}
 
console.log(innersource(test1)); //  console.log('hello'); 
$ npm test