Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 540 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 540 Bytes

fn-extractor

Extracts your functions from JavaScript code and returns them in an Object

Build Status

Install

npm install fn-extractor

Example

var extract = require('fn-extractor');
var functions = extract('(function () { function foo() { return 1; } })');

typeof functions.foo === 'function' // true
functions.foo() === 1 // true

License

MIT