Nicely Pointed Mandibles

npm

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

fat-arrow

1.0.0 • Public • Published

fat-arrow

NPM version build status Test coverage Downloads js-standard-style

Easy returns for if you don't have a () => around. Works well with Promises when you have to return another value in a .then() chain. Actually this is just a closure-as-a-module.

Installation

$ npm install fat-arrow

Usage

const fa = require('fat-arrow')
 
Promise.resolve('myVal')
  .then(asyncAction)
  // => 'myVal'
 
function asyncAction(val) {
  return Promise.resolve('anotherVal')
    .then(fa(val))
}

License

MIT

install

npm i fat-arrow

Downloadsweekly downloads

0

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability