Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Determine if a function is an ES6 arrow function or not.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.eslintrc
.gitignore
.jscs.json
.nvmrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json

README.md

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));
assert(isArrowFunction(() => 42));
assert(isArrowFunction(x => x * x));
assert(isArrowFunction(x => () => x * x));

Tests

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

Something went wrong with that request. Please try again.