make-arrow-function
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/make-arrow-function package

1.2.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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    370
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    370
  • 1.1.0
    3
  • 1.0.0
    1

Package Sidebar

Install

npm i make-arrow-function

Weekly Downloads

134

Version

1.2.0

License

MIT

Unpacked Size

21.6 kB

Total Files

11

Last publish

Collaborators

  • ljharb