Package Exports
- is-empty-function
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-empty-function) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Checks the given function (or fn.toString()) is with empty body - dont have body.
Install
npm install is-empty-function
npm test
Related
API
For more use-cases see the tests
isEmptyFunction
Check given function have empty body or not, and returns true or false.
[fn]
{Function|String} passed to parse-functionreturn
{Boolean}
Example:
var isEmptyFunction = require('is-empty-function');
var fixture = 'function() {}';
isEmptyFunction(fixture);
//=> true
var fixture = function named() {};
isEmptyFunction(fixture);
//=> true
var fixture = function() { return true; };
isEmptyFunction(fixture);
//=> false
var fixture = function named() { return true; };
isEmptyFunction(fixture);
//=> false
Author
Charlike Mike Reagent
License 
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Powered and automated by kdf, January 26, 2015