npm

Need private packages and team management tools?Check out npm Orgs. »

make-arrow-function

1.1.0 • Public • Published

make-arrow-function Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

Function that returns an arbitrary arrow function, or undefined if arrow function syntax is unsupported.

Example

var maybeArrowFunction = require('make-arrow-function')();
if (maybeArrowFunction) {
    assert(typeof maybeArrowFunction === 'function');
} else {
    assert(typeof maybeArrowFunction === 'undefined');
}
 
var arrowFunctions = require('make-arrow-function').list();
assert(arrowFunctions.every(function (fn) { return typeof fn === 'function'; }));

Tests

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

install

npm i make-arrow-function

Downloadsweekly downloads

2,251

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability