1.0.8 • Published 7 years ago

tiny-promises v1.0.8

Weekly downloads
13
License
MIT
Repository
github
Last release
7 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

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago