1.0.8 • Published 8 years ago

tiny-promises v1.0.8

Weekly downloads
13
License
MIT
Repository
github
Last release
8 years ago

tiny-promises

Extend nodejs Promise with a lot of useful methods.

Installation

$ npm install --save tiny-promises

Usage

  • Require it in your main file (entry point).
// index.js

require('tiny-promises');
  • Create your *.d.ts in root folder and add reference to tiny-promises type.
// app.d.ts

/// <reference types="tiny-promises" />
  • Done.

Methods

queue

Promise.queue<T, K>(queue: T[], handler: (item: T) => Promise<K>): Promise<K[]>

pipe

Promise.pipe<T>(...funcs: ((arg) => Promise<T>)[]): (arg) => Promise<T>

pipeArray

Promise.pipeArray<T>(funcs: ((arg) => Promise<T>)[]): (arg) => Promise<T>

License

MIT

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago