open-index/open-npm huggingface dataset:
npm package: @promises/parallel
Description: Parallel is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/parallel
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/parallel)
[![Version](https://img.shields.io/npm/v/@promises/parallel.svg)](https://www.npmjs.com/package/@promises/parallel)
[![MIT License](https://img.shields.io/npm/l/@promises/parallel.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/parallel.svg)](https://bundlephobia.com/result?p=@promises/parallel)

**Parallel is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/parallel
```
```typescript
import {
 default as parallel
} from '@promises/parallel';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/parallel/bundle.umd.min.js"></script>
```
```typescript
let {
 parallel
} = P;
```


**Examples**
```typescript
 let fn = (id: string, ms: number) => () => timeout((resolve) => {
     console.log(id);
     resolve(id);
 }, ms);
 let functions = {
     zero: fn(0, 7),
     one: fn(1, 3),
     two: fn(2, 5),
 };

 parallel(functions).then((result: {[key: string]: number}) => {
     console.log(result);
 });

 // => 1
 // => 2
 // => 0
 // => { zero: 0, one: 1, two: 2}
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/parallel
```
```typescript
import Promises from '@promises/core';
import '@promises/parallel/add';
```
*Or*
```typescript
import Promises from '@promises/parallel/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/parallel/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let fn = (id: string, ms: number) => () => timeout((resolve) => {
     console.log(id);
     resolve(id);
 }, ms);
 let functions = [
     fn('zero', 7),
     fn('one', 3),
     fn('two', 5)
 ];

 Promises.parallel(functions).then((result: string[]) => {
     console.log(result);
 });

 // => 'one'
 // => 'two'
 // => 'zero'
 // => ['zero', 'one', 'two']
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/promisify
Description: Promisify is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/promisify
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/promisify)
[![Version](https://img.shields.io/npm/v/@promises/promisify.svg)](https://www.npmjs.com/package/@promises/promisify)
[![MIT License](https://img.shields.io/npm/l/@promises/promisify.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/promisify.svg)](https://bundlephobia.com/result?p=@promises/promisify)

**Promisify is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/promisify
```
```typescript
import {
 default as promisify
} from '@promises/promisify';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/promisify/bundle.umd.min.js"></script>
```
```typescript
let {
 promisify
} = P;
```


**Examples**
```typescript
 function pass<T>(value: T, cb: (error:any, result: T) => void){
     cb(null, value);
 }

 let passWrap: <T>(text: T) => Promise<T> = promisify(pass);
 let promise: Promise<string> = passWrap<string>('foo');

 promise.then((result: string) => {
     console.log(result); // result => 'foo';
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/promisify
```
```typescript
import Promises from '@promises/core';
import '@promises/promisify/add';
```
*Or*
```typescript
import Promises from '@promises/promisify/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/promisify/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 function pass<T>(value: T, cb: (error:any, result: T) => void){
     cb(null, value);
 }

 let passWrap: <T>(text: T) => Promises<T> = Promises.promisify(pass);
 let promises: Promises<string> = passWrap<string>('foo');

 promises.then((result: string) => {
     console.log(result); // result => 'foo';
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/reduce-right-series
Description: Reduce Right Series is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/reduce-right-series
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/reduce-right-series)
[![Version](https://img.shields.io/npm/v/@promises/reduce-right-series.svg)](https://www.npmjs.com/package/@promises/reduce-right-series)
[![MIT License](https://img.shields.io/npm/l/@promises/reduce-right-series.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/reduce-right-series.svg)](https://bundlephobia.com/result?p=@promises/reduce-right-series)

**Reduce Right Series is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/reduce-right-series
```
```typescript
import {
 default as reduceRightSeries
} from '@promises/reduce-right-series';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reduce-right-series/bundle.umd.min.js"></script>
```
```typescript
let {
 reduceRightSeries
} = P;
```


**Examples**
```typescript
 let array: number[] = [0, 1, 2, 3];

 reduceRightSeries(array, (sum: number, num: number) => Promise.resolve(sum + num), 0).then((result: number) => {
     console.log(result); // => 6
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/reduce-right-series
```
```typescript
import {
 __,
 default as reduceRightSeries
} from '@promises/reduce-right-series/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reduce-right-series/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 reduceRightSeries
} = PF;
```


**Examples**
```typescript
 let array: number[] = [0, 1, 2, 3];

 reduceRightSeries((sum: number, num: number) => Promise.resolve(sum + num), 0)(array).then((result: number) => {
     console.log(result); // => 6
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/reduce-right-series
```
```typescript
import Promises from '@promises/core';
import '@promises/reduce-right-series/add';
```
*Or*
```typescript
import Promises from '@promises/reduce-right-series/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/reduce-right-series/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let array: number[] = [0, 1, 2, 3];
 let promises: Promises<number[]> = Promises.resolve<number[]>(array);

 promises.reduceRightSeries((sum: number, num: number) => Promises.resolve(sum + num), 0).then((result: number) => {
     console.log(result); // => 6
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/reduce-series
Description: Reduce Series is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/reduce-series
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/reduce-series)
[![Version](https://img.shields.io/npm/v/@promises/reduce-series.svg)](https://www.npmjs.com/package/@promises/reduce-series)
[![MIT License](https://img.shields.io/npm/l/@promises/reduce-series.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/reduce-series.svg)](https://bundlephobia.com/result?p=@promises/reduce-series)

**Reduce Series is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/reduce-series
```
```typescript
import {
 default as reduceSeries
} from '@promises/reduce-series';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reduce-series/bundle.umd.min.js"></script>
```
```typescript
let {
 reduceSeries
} = P;
```


**Examples**
```typescript
 let array: number[] = [0, 1, 2, 3];

 reduceSeries(array, (sum: number, num: number) => Promises.resolve(sum + num), 0).then((result: number) => {
     console.log(result); // => 6
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/reduce-series
```
```typescript
import {
 __,
 default as reduceSeries
} from '@promises/reduce-series/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reduce-series/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 reduceSeries
} = PF;
```


**Examples**
```typescript
 let array: number[] = [0, 1, 2, 3];

 reduceSeries((sum: number, num: number) => Promises.resolve(sum + num), 0, array).then((result: number) => {
     console.log(result); // => 6
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/reduce-series
```
```typescript
import Promises from '@promises/core';
import '@promises/reduce-series/add';
```
*Or*
```typescript
import Promises from '@promises/reduce-series/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/reduce-series/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let array: number[] = [0, 1, 2, 3];
 let promises: Promises<number[]> = Promises.resolve<number[]>(array);

 promises.reduceSeries((sum: number, num: number) => Promises.resolve(sum + num), 0).then((result: number) => {
     console.log(result); // => 6
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/reject-parallel
Description: Reject Parallel is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/reject-parallel
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/reject-parallel)
[![Version](https://img.shields.io/npm/v/@promises/reject-parallel.svg)](https://www.npmjs.com/package/@promises/reject-parallel)
[![MIT License](https://img.shields.io/npm/l/@promises/reject-parallel.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/reject-parallel.svg)](https://bundlephobia.com/result?p=@promises/reject-parallel)

**Reject Parallel is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/reject-parallel
```
```typescript
import {
 default as rejectParallel
} from '@promises/reject-parallel';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reject-parallel/bundle.umd.min.js"></script>
```
```typescript
let {
 rejectParallel
} = P;
```


**Examples**
```typescript
 let array: any[] = ['yes', null, 0, true];

 rejectParallel(array).then((result: any[]) => {
     console.log(result); // => [null, 0]
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/reject-parallel
```
```typescript
import {
 __,
 default as rejectParallel
} from '@promises/reject-parallel/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reject-parallel/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 rejectParallel
} = PF;
```


**Examples**
```typescript
 let array: any[] = ['yes', null, 0, true];

 rejectParallel(Boolean)(1)(array).then((result: any[]) => {
     console.log(result); // => [null, 0]
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/reject-parallel
```
```typescript
import Promises from '@promises/core';
import '@promises/reject-parallel/add';
```
*Or*
```typescript
import Promises from '@promises/reject-parallel/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/reject-parallel/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let array: any[] = ['yes', null, 0, true];
 let promises: Promises<any[]> = Promises.resolve(array);

 promises.rejectParallel().then((result: any[]) => {
     console.log(result); // => [null, 0]
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/reject-series
Description: Reject Series is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/reject-series
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/reject-series)
[![Version](https://img.shields.io/npm/v/@promises/reject-series.svg)](https://www.npmjs.com/package/@promises/reject-series)
[![MIT License](https://img.shields.io/npm/l/@promises/reject-series.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/reject-series.svg)](https://bundlephobia.com/result?p=@promises/reject-series)

**Reject Series is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/reject-series
```
```typescript
import {
 default as rejectSeries
} from '@promises/reject-series';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reject-series/bundle.umd.min.js"></script>
```
```typescript
let {
 rejectSeries
} = P;
```


**Examples**
```typescript
 let array: any[] = ['yes', null, 0, true];
 let promise: Promise<any[]> = Promise.resolve(array);

 rejectSeries(promise).then((result: any[]) => {
     console.log(result); // => [null, 0]
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/reject-series
```
```typescript
import {
 __,
 default as rejectSeries
} from '@promises/reject-series/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reject-series/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 rejectSeries
} = PF;
```


**Examples**
```typescript
 let array: any[] = ['yes', null, 0, true];
 let promise: Promise<any[]> = Promise.resolve(array);

 rejectSeries(void 0, promise).then((result: any[]) => {
     console.log(result); // => [null, 0]
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/reject-series
```
```typescript
import Promises from '@promises/core';
import '@promises/reject-series/add';
```
*Or*
```typescript
import Promises from '@promises/reject-series/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/reject-series/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let array: any[] = ['yes', null, 0, true];
 let promises: Promises<any[]> = Promises.resolve(array);

 promises.rejectSeries().then((result: any[]) => {
     console.log(result); // => [null, 0]
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/reset
Description: Reset is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/reset
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/reset)
[![Version](https://img.shields.io/npm/v/@promises/reset.svg)](https://www.npmjs.com/package/@promises/reset)
[![MIT License](https://img.shields.io/npm/l/@promises/reset.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/reset.svg)](https://bundlephobia.com/result?p=@promises/reset)

**Reset is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/reset
```
```typescript
import {
 default as reset
} from '@promises/reset';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reset/bundle.umd.min.js"></script>
```
```typescript
let {
 reset
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');

 reset(promise, 'bar').then((result: string) => {
   console.log(result); // => 'bar'
 });
```
```typescript
 let promise: Promise<string> = Promise.reject<string>('foo');

 reset(promise, 'bar').then((result: string) => {
   console.log(result); // => 'bar'
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/reset
```
```typescript
import {
 __,
 default as reset
} from '@promises/reset/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/reset/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 reset
} = PF;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');

 reset('bar')(promise).then((result: string) => {
   console.log(result); // => 'bar'
 });
```
```typescript
 let promise: Promise<string> = Promise.reject<string>('foo');

 reset('bar', promise).then((result: string) => {
   console.log(result); // => 'bar'
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/reset
```
```typescript
import Promises from '@promises/core';
import '@promises/reset/add';
```
*Or*
```typescript
import Promises from '@promises/reset/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/reset/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve<string>('foo').reset('bar');
 promises.then((result: string) => {
   console.log(result); // => 'bar'
 });,

 let promises: Promises<string> = Promises.reject<string>('foo').reset('bar');
 promises.then((result: string) => {
   console.log(result); // => 'bar'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/retry
Description: Retry is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/retry
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/retry)
[![Version](https://img.shields.io/npm/v/@promises/retry.svg)](https://www.npmjs.com/package/@promises/retry)
[![MIT License](https://img.shields.io/npm/l/@promises/retry.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/retry.svg)](https://bundlephobia.com/result?p=@promises/retry)

**Retry is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/retry
```
```typescript
import {
 default as retry
} from '@promises/retry';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/retry/bundle.umd.min.js"></script>
```
```typescript
let {
 retry
} = P;
```


**Examples**
```typescript
 let count: number = 0;

 let promise: Promise<string> = retry<string>(()=>{
     if(count++ < 2)  throw 'error';
     return 'foo';
 }, {times: 3});

 promises.then((result: string) => {
     console.log(result); // => 'foo'
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/retry
```
```typescript
import Promises from '@promises/core';
import '@promises/retry/add';
```
*Or*
```typescript
import Promises from '@promises/retry/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/retry/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let count: number = 0;
 let promises: Promises<string> = Promises.retry(()=>{
     if(count++ < 2)  throw 'error';
     return 'foo';
 }, {times: 3});

 promises.then((result: string) => {
     console.log(result); // => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/series
Description: Series is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/series
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/series)
[![Version](https://img.shields.io/npm/v/@promises/series.svg)](https://www.npmjs.com/package/@promises/series)
[![MIT License](https://img.shields.io/npm/l/@promises/series.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/series.svg)](https://bundlephobia.com/result?p=@promises/series)

**Series is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/series
```
```typescript
import {
 default as series
} from '@promises/series';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/series/bundle.umd.min.js"></script>
```
```typescript
let {
 series
} = P;
```


**Examples**
```typescript
 let fn = (id: string, ms: number) => () => timeout((resolve) => {
     console.log(id);
     resolve(id);
 }, ms);
 let functions = [
     fn('zero', 7),
     fn('one', 3),
     fn('two', 5)
 ];

 series(functions).then((result: string[]) => {
     console.log(result);
 });

 // => 'zero'
 // => 'one'
 // => 'two'
 // => ['zero', 'one', 'two']
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/series
```
```typescript
import Promises from '@promises/core';
import '@promises/series/add';
```
*Or*
```typescript
import Promises from '@promises/series/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/series/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let fn = (id: string, ms: number) => () => timeout((resolve) => {
     console.log(id);
     resolve(id);
 }, ms);
 let functions = {
     zero: fn(0, 7),
     one: fn(1, 3),
     two: fn(2, 5),
 };

 Promises.series(functions).then((result: {[key: string]: number}) => {
     console.log(result);
 });

 // => 0
 // => 1
 // => 2
 // => { zero: 0, one: 1, two: 2}
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/sleep
Description: Sleep is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/sleep
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/sleep)
[![Version](https://img.shields.io/npm/v/@promises/sleep.svg)](https://www.npmjs.com/package/@promises/sleep)
[![MIT License](https://img.shields.io/npm/l/@promises/sleep.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/sleep.svg)](https://bundlephobia.com/result?p=@promises/sleep)

**Sleep is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/sleep
```
```typescript
import {
 default as sleep
} from '@promises/sleep';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/sleep/bundle.umd.min.js"></script>
```
```typescript
let {
 sleep
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');

 sleep(promise, 3000).then((result: string) => {
   console.log(result); // result => 'foo'
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/sleep
```
```typescript
import {
 __,
 default as sleep
} from '@promises/sleep/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/sleep/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 sleep
} = PF;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');

 sleep(3000, promise).then((result: string) => {
   console.log(result); // result => 'foo'
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/sleep
```
```typescript
import Promises from '@promises/core';
import '@promises/sleep/add';
```
*Or*
```typescript
import Promises from '@promises/sleep/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/sleep/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve<string>('foo');
 promises.sleep(3000).then((result: string) => {
   console.log(result); // result => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/some-parallel
Description: Some Parallel is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/some-parallel
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/some-parallel)
[![Version](https://img.shields.io/npm/v/@promises/some-parallel.svg)](https://www.npmjs.com/package/@promises/some-parallel)
[![MIT License](https://img.shields.io/npm/l/@promises/some-parallel.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/some-parallel.svg)](https://bundlephobia.com/result?p=@promises/some-parallel)

**Some Parallel is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/some-parallel
```
```typescript
import {
 default as someParallel
} from '@promises/some-parallel';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/some-parallel/bundle.umd.min.js"></script>
```
```typescript
let {
 someParallel
} = P;
```


**Examples**
```typescript
 let array: any[] = [0, null, true, false];

 someParallel(array).then((result: boolean) => {
     console.log(result); // result => true
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/some-parallel
```
```typescript
import {
 __,
 default as someParallel
} from '@promises/some-parallel/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/some-parallel/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 someParallel
} = PF;
```


**Examples**
```typescript
 let array: any[] = [0, null, true, false];

 someParallel(void 0, 3, array).then((result: boolean) => {
     console.log(result); // result => true
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/some-parallel
```
```typescript
import Promises from '@promises/core';
import '@promises/some-parallel/add';
```
*Or*
```typescript
import Promises from '@promises/some-parallel/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/some-parallel/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let array: any[] = [0, null, true, false];
 let promises: Promises<any[]> = Promises.resolve(array);

 promises.someParallel().then((result: boolean) => {
   console.log(result); // result => true
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/some-series
Description: Some Series is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/some-series
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/some-series)
[![Version](https://img.shields.io/npm/v/@promises/some-series.svg)](https://www.npmjs.com/package/@promises/some-series)
[![MIT License](https://img.shields.io/npm/l/@promises/some-series.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/some-series.svg)](https://bundlephobia.com/result?p=@promises/some-series)

**Some Series is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/some-series
```
```typescript
import {
 default as someSeries
} from '@promises/some-series';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/some-series/bundle.umd.min.js"></script>
```
```typescript
let {
 someSeries
} = P;
```


**Examples**
```typescript
 let array: any[] = [0, null, true, false];

 someSeries(array).then((result: boolean) => {
     console.log(result); // result => true
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/some-series
```
```typescript
import {
 __,
 default as someSeries
} from '@promises/some-series/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/some-series/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 someSeries
} = PF;
```


**Examples**
```typescript
 let array: any[] = [0, null, true, false];

 someSeries(Boolean)(array).then((result: boolean) => {
     console.log(result); // result => true
 });
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/some-series
```
```typescript
import Promises from '@promises/core';
import '@promises/some-series/add';
```
*Or*
```typescript
import Promises from '@promises/some-series/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/some-series/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let array: any[] = [0, null, true, false];
 let promises = Promises.resolve(array);

 promises.someSeries().then((result: boolean) => {
   console.log(result); // result => true
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/spread
Description: Spread is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/spread
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/spread)
[![Version](https://img.shields.io/npm/v/@promises/spread.svg)](https://www.npmjs.com/package/@promises/spread)
[![MIT License](https://img.shields.io/npm/l/@promises/spread.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/spread.svg)](https://bundlephobia.com/result?p=@promises/spread)

**Spread is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/spread
```
```typescript
import {
 default as spread
} from '@promises/spread';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/spread/bundle.umd.min.js"></script>
```
```typescript
let {
 spread
} = P;
```


**Examples**
```typescript
 let promise = Promise.resolve([Promise.resolve('foo'), 'bar']);

 spread(promise, (a: string, b: string) => {
     console.log(a); // a => 'foo'
     console.log(b); // b => 'bar'
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/spread
```
```typescript
import Promises from '@promises/core';
import '@promises/spread/add';
```
*Or*
```typescript
import Promises from '@promises/spread/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/spread/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises = Promises.all(['foo', Promises.resolve('bar')]);

 promises.spread((a: string, b: string) => {
     console.log(a); // a => 'foo'
     console.log(b); // b => 'bar'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/timeout
Description: Timeout is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/timeout
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/timeout)
[![Version](https://img.shields.io/npm/v/@promises/timeout.svg)](https://www.npmjs.com/package/@promises/timeout)
[![MIT License](https://img.shields.io/npm/l/@promises/timeout.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/timeout.svg)](https://bundlephobia.com/result?p=@promises/timeout)

**Timeout is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/timeout
```
```typescript
import {
 default as timeout
} from '@promises/timeout';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/timeout/bundle.umd.min.js"></script>
```
```typescript
let {
 timeout
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = timeout<string>((resolve, reject)=>{
     resolve('foo')
 }, 3000);

 promise.then((result: string)=>{
     console.log(result); // result => 'foo'
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/timeout
```
```typescript
import Promises from '@promises/core';
import '@promises/timeout/add';
```
*Or*
```typescript
import Promises from '@promises/timeout/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/timeout/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.timeout<string>((resolve, reject)=>{
     resolve('foo')
 }, 3000);

 promises.then((result: string)=>{
     console.log(result); // result => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/timer
Description: Timer is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/timer
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/timer)
[![Version](https://img.shields.io/npm/v/@promises/timer.svg)](https://www.npmjs.com/package/@promises/timer)
[![MIT License](https://img.shields.io/npm/l/@promises/timer.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/timer.svg)](https://bundlephobia.com/result?p=@promises/timer)

**Timer is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/timer
```
```typescript
import {
 default as timer
} from '@promises/timer';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/timer/bundle.umd.min.js"></script>
```
```typescript
let {
 timer
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo').delay(3000);

 timer(promise, 1500, 'error: timeout').catch((error: string) => {
     console.log(error); // error => 'error: timeout'
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/timer
```
```typescript
import Promises from '@promises/core';
import '@promises/timer/add';
```
*Or*
```typescript
import Promises from '@promises/timer/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/timer/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve<string>('foo').delay(3000);

 promises.timer(1500, 'error: timeout').catch((error: string) => {
     console.log(error); // error => 'error: timeout'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/to-callback
Description: To Callback is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/to-callback
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/to-callback)
[![Version](https://img.shields.io/npm/v/@promises/to-callback.svg)](https://www.npmjs.com/package/@promises/to-callback)
[![MIT License](https://img.shields.io/npm/l/@promises/to-callback.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/to-callback.svg)](https://bundlephobia.com/result?p=@promises/to-callback)

**To Callback is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/to-callback
```
```typescript
import {
 default as toCallback
} from '@promises/to-callback';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/to-callback/bundle.umd.min.js"></script>
```
```typescript
let {
 toCallback
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');

 toCallback(promise, (error: any, result: string) => {
     console.log(error); // error => null
     console.log(result); // result => 'foo'
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/to-callback
```
```typescript
import {
 __,
 default as toCallback
} from '@promises/to-callback/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/to-callback/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 toCallback
} = PF;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');

 toCallback((error: any, result: string) => {
     console.log(error); // error => null
     console.log(result); // result => 'foo'
 })(promise);
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/to-callback
```
```typescript
import Promises from '@promises/core';
import '@promises/to-callback/add';
```
*Or*
```typescript
import Promises from '@promises/to-callback/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/to-callback/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve<string>('foo');

 promises.toCallback((error: any, result: string) => {
     console.log(error); // error => null
     console.log(result); // result => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/to-observable
Description: To Observable is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/to-observable
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/to-observable)
[![Version](https://img.shields.io/npm/v/@promises/to-observable.svg)](https://www.npmjs.com/package/@promises/to-observable)
[![MIT License](https://img.shields.io/npm/l/@promises/to-observable.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/to-observable.svg)](https://bundlephobia.com/result?p=@promises/to-observable)

**To Observable is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/to-observable
```
```typescript
import {
 default as toObservable
} from '@promises/to-observable';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/to-observable/bundle.umd.min.js"></script>
```
```typescript
let {
 toObservable
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve('foo');
 let observable: Observable<string> = toObservable(promise);

 observable.subscribe((result: string) => {
     console.log(result); // result => 'foo'
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/to-observable
```
```typescript
import Promises from '@promises/core';
import '@promises/to-observable/add';
```
*Or*
```typescript
import Promises from '@promises/to-observable/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/to-observable/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve('foo');
 let observable: Observable<string> = promises.toObservable();

 observable.subscribe((result: string) => {
     console.log(result); // result => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).
npm package: @promises/wait
Description: Wait is package from Promises library
Author: Yisrael Eliev
Latest version: 0.5.0



# @promises/wait
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/wait)
[![Version](https://img.shields.io/npm/v/@promises/wait.svg)](https://www.npmjs.com/package/@promises/wait)
[![MIT License](https://img.shields.io/npm/l/@promises/wait.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/wait.svg)](https://bundlephobia.com/result?p=@promises/wait)

**Wait is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/wait
```
```typescript
import {
 default as wait
} from '@promises/wait';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/wait/bundle.umd.min.js"></script>
```
```typescript
let {
 wait
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');
 let count: number = 0;

 wait(promise, () => count++ === 3, 1000).then((result: string) => {
   console.log(result); // result => 'foo'
 });
```


### Functional programming

**Module**
```sh
$ npm install --save @promises/wait
```
```typescript
import {
 __,
 default as wait
} from '@promises/wait/fp';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/wait/fp/bundle.umd.min.js"></script>
```
```typescript
let {
 __,
 wait
} = PF;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve<string>('foo');
 let count: number = 0;

 wait(() => count++ === 3, 1000).then((result: string) => {
   console.log(result); // result => 'foo'
 })(100)(promise);
```


### Wrapper

**Module**
```sh
$ npm install --save @promises/wait
```
```typescript
import Promises from '@promises/core';
import '@promises/wait/add';
```
*Or*
```typescript
import Promises from '@promises/wait/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/wait/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve<string>('foo');
 let count: number = 0;
 promises.wait(() => count++ === 3, 1000).then((result: string) => {
   console.log(result); // result => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).