is-arrow-function

Determine if a function is an ES6 arrow function or not.

npm install is-arrow-function
4 downloads in the last week
6 downloads in the last month

is-arrow-function Version Badge

Build Status dependency status dev dependency status

npm badge

browser support

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));

Tests

Simply clone the repo, npm install, and run npm test

npm loves you