Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lie-cast

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lie-cast

cast a lie

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

liar

a toolbelt of deceit

API

npm install liar
var promise = require('liar');

###all

promise.all(array of promises)

returns a promise for an array of all the responses, returns an error if any of the promises throw errors. Returned values are in the same order as the input array.

###some

promise.some(array of promises)

Similar to all but will only throw an error if all of the promises throw errors, otherwise returns an array of whichever values succeded in the order that they completed, on error returns an array of errors.

###map

promise.map(array of promises, function)

Takes the array of values, applies function to them, and returns a promise for all the values. Function will be called with a value (not a promise) and may return either a promise or a value, array can filled with promises or values or a mixture.

###race

promise.race(array of promises)

resolved with whatever value or error that resolves first.

###cast

promise.cast(value or promise)

If it's a promise, returns it, if it's a value, returns a promise that resolves to it.

###use

promise.use(value or promise, function)

If the value is a promise, apply the function to the value it resolves into and return a promise for that, otherwise apply the function to the value and return the result.

###resolve

promise.resolve(value)

create a promise that is resolved with this value.

###reject

promise.reject(value)

create a promise that is rejected with this value.

License

MIT

Keywords

FAQs

Package last updated on 23 Oct 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc