Socket
Book a DemoInstallSign in
Socket

fat-arrow

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fat-arrow

Easy returns for if you don't have a () => around

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

Keywords

return

FAQs

Package last updated on 14 Mar 2015

Did you know?

Socket

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