0.5.0 • Published 7 years ago
@promises/some-parallel v0.5.0
@promises/some-parallel
Some Parallel is package from Promises library
Use
Module
$ npm install --save @promises/some-parallelimport {
default as someParallel
} from '@promises/some-parallel';Browser
<script src="https://unpkg.com/@promises/some-parallel/bundle.umd.min.js"></script>let {
someParallel
} = P;Examples
let array: any[] = [0, null, true, false];
someParallel(array).then((result: boolean) => {
console.log(result); // result => true
});Functional programming
Module
$ npm install --save @promises/some-parallelimport {
__,
default as someParallel
} from '@promises/some-parallel/fp';Browser
<script src="https://unpkg.com/@promises/some-parallel/fp/bundle.umd.min.js"></script>let {
__,
someParallel
} = PF;Examples
let array: any[] = [0, null, true, false];
someParallel(void 0, 3, array).then((result: boolean) => {
console.log(result); // result => true
});Wrapper
Module
$ npm install --save @promises/some-parallelimport Promises from '@promises/core';
import '@promises/some-parallel/add';Or
import Promises from '@promises/some-parallel/add';Browser
<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>let {
Promises
} = P;Examples
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, Licensed under the MIT license.