Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

make-arrow-function

ljharb13.6kMIT1.2.0TypeScript support: definitely-typed

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

arrow function, ES6, arrow, fat arrow

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Generated by auto-changelog.

v1.2.0 - 2020-01-28

Merged

  • [Docs] Add license text #1

Commits

  • [Tests] use shared travis-ci configs a2dbb15
  • [Tests] remove jscs 47362d9
  • [Tests] up to node v8.4, v7.10, v6.11, v4.8; newer npm breaks on older node; improve matrix. 7d9c76d
  • [Tests] up to node v12.11, v11.15, v10.16, v8.16, v6.17 42b5df9
  • [meta] add auto-changelog 98573fe
  • [Tests] up to node v11.1, v10.13, v9.11, v8.12, v6.14, v4.9; use nvm install-latest-npm bda106c
  • [Tests] up to node v9.3, v8.9, v6.12; use nvm install-latest-npm; pin included builds to LTS 4ec5c2d
  • [Breaking] add more complex arrow functions to the list, with non-simple parameter lists 121cd07
  • [Tests] up to node v7.0, v6.9, v4.6; improve test matrix f91282e
  • [Dev Deps] update tape, jscs, eslint, @ljharb/eslint-config, nsp 5fbfc69
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config, nsp 74af4f3
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape 5c202b1
  • Add license text e5d6698
  • [Dev Deps] update tape, jscs, eslint, @ljharb/eslint-config f8bb7a9
  • [Dev Deps] update tape, jscs, eslint, @ljharb/eslint-config, nsp b27f7ee
  • [Dev Deps] update tape, jscs, eslint,nsp[58a2d0e`](https://github.com/ljharb/make-arrow-function/commit/58a2d0eb842f695a3f5fd6645a74c69c48e6dbe5)
  • [Tests] Fixing the tests for node 0.12. cab9a83
  • [Dev Deps] update jscs, eslint, nsp 5afb885
  • [actions] add automatic rebasing / merge commit blocking 5620d1b
  • [Tests] up to v5.6, v4.3 308f593
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config, nsp 99f9eeb
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config 561d1e5
  • [Dev Deps] update tape, eslint, @ljharb/eslint-config 1a44053
  • [Dev Deps] update tape, jscs, nsp, eslint, @ljharb/eslint-config 7adf890
  • [Tests] up to node v5.9, v4.4 bd412a5
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config, nsp 8a23d6c
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape, nsp 69ef6fa
  • [Tests] up to io.js v3.3, node v4.1 ca199f0
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape; add safe-publish-latest 5907bd2
  • [Dev Deps] update eslint, @ljharb/eslint-config, covert, tape 2ce975f
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp, tape fcb3fb4
  • Only apps should have lockfiles. 7cfdd91
  • [Tests] fix npm upgrades for older nodes e0a7daa
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config, nsp 5fa4159
  • [Tests] use npx aud instead of nsp or npm audit with hoops 92245fc
  • [Tests] use npm audit instead of nsp 34b329f
  • [Tests] up to node v6.2 904b5f7
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp e34fcc9
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp 064520a
  • [Dev Deps] update nsp, eslint bec9f88
  • [Tests] up to node v7.2 5f02294
  • [Dev Deps] remove unused eccheck script + dep 00c7167
  • [Tests] use pretest/posttest for linting/security 3dacf2b
  • [meta] add funding field c03306f
  • node supports arrow functions now. b593c16
  • [Dev Deps] update eslint 2377184
  • [Dev Deps] update eslint cf7208f
  • [Tests] on node v5.12 4200680
  • [Tests] on node v5.10 d108b50
  • [Dev Deps] update @ljharb/eslint-config 1276f60
  • [Tests] on node v5.1 5f8e775
  • [Tests] on node v4.2 fc0da59
  • [Tests] on node v5.0 c38c355

v1.1.0 - 2015-08-18

Commits

  • Update eslint, tape; use my personal shared eslint config. bfe1710
  • Add npm run eslint a03fb9b
  • Update tape, covert, jscs cec9e4c
  • Update eslint 6094194
  • Update tape, jscs, eslint, @ljharb/eslint-config bea60f8
  • All grade A-supported node/iojs versions now ship with an npm that understands ^. 4a2dfca
  • Test up to io.js v2.2 2919253
  • Update eslint, nsp 2ca00cb
  • Adding a CHANGELOG b9e3baa
  • [Dev Deps] update jscs 9f065ad
  • Update is, tape, jscs, nsp e34e281
  • Run travis-ci tests on iojs and node v0.12; speed up builds; allow 0.8 failures. 8e3ca1d
  • Test on latest io.js 2b529be
  • Removing unused devDeps; updating editorconfig-tools 82a4ab0
  • Add arrow functions with explicit block bodies. 610403c
  • [Dev Deps] Update tape, eslint 84aac4c
  • Test on iojs-v1.5 and iojs-v1.6 17b0ec9
  • Update editorconfig-tools, nsp e69c479
  • Update jscs ce48723
  • Test up to io.js v3.0 c230011
  • [Dev Deps] update tape 4035b74
  • Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. 0bbbc0f
  • Test on io.js v2.4 35968fc
  • Test on io.js v2.3 50b5d68
  • Test on iojs-v1.2 10c8b49

v1.0.0 - 2014-12-15

Commits