is-arrow-function ![Version Badge](https://camo.githubusercontent.com/82715e8d9d7d8b490c16cc4b8225c83041f2015020724cb60d2f1015a8adb91c/68747470733a2f2f76657273696f6e626164672e65732f696e73706563742d6a732f69732d6172726f772d66756e6374696f6e2e737667)
npm module to determine if a function is an ES6 arrow function or not.
NOTE: Only works in Firefox at the moment.
Example
var isArrowFunction = require('is-arrow-function');
assert(!isArrowFunction(function () {}));
assert(!isArrowFunction(null));
assert(isArrowFunction((a, b) => a * b));
assert(isArrowFunction(() => 42));
assert(isArrowFunction(x => x * x));
assert(isArrowFunction(x => () => x * x));
Tests
Simply clone the repo, npm install
, and run npm test