Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fnbody

miguelmota22MIT0.0.2

Stringifies the contents of a function body.

function, string, body

readme

fnbody

Stringifies the contents of a function body.

NPM

Install

npm install fnbody
bower install fnbody

Usage

var fnbody = require('fnbody');

function foo() {
  var foo = 'bar';
  return function(qux) {
    return foo + qux;
  };
}

console.log(fnbody(foo)); // "  var foo = \'bar\';\n  return function(qux) {\n    return foo + qux;\n  };");

Test

npm test

License

MIT

changelog

Change Log

All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

[0.0.1] - 2015-08-14

Changed

  • Preserve leading and ending whitespace