Socket
Socket
Sign inDemoInstall

is-arrow-function

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-arrow-function

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


Version published
Maintainers
1
Install size
33.7 kB
Created

Readme

Source

#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

Keywords

FAQs

Last updated on 16 Aug 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc