function-equal

Compares two functions, are they equal? Checks their names, bodies and argument names. Powered by
parse-function
.
Install
npm i function-equal --save
Usage
For more use-cases see the tests
const functionEqual =
functionEqual
Check two functions are strictly the same.
Params
a
{Function}b
{Function}returns
{Boolean}
Example
var fnEqual = // returns trueconsoleconsoleconsole console // => falseconsole // => falseconsole // => trueconsole // => trueconsole // => false
Related
- error-base: Create custom Error classes. | homepage
- is-empty-function: Check that given string, function or arrow function have empty body,… more | homepage
- kind-error: Base class for easily creating meaningful and quiet by default Error… more | homepage
- kind-of: Get the native type of a value. | homepage
- parse-function: Parse a function, arrow function or string to object with name,… more | homepage
- useful-error: Enhanced Error class for creating meaningful and customizable error classes. Adds… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.