1.1.1 • Published 5 years ago

@pthread/async-operators v1.1.1

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

async-operators

Async is Cool !!

Install

$ npm install @pthread/async-operators

Usage

let { asyncMap, asyncFilter, asyncReduce } = require("async-operators")

//asyncMap(list, mapper)
asyncMap([1, 2, 3, 4, 5, 6], i => i * 2).then(o=>{console.log(o)});
console.log("i executed first");

//asyncReduce(list, reducer)
asyncReduce([1, 2, 3, 4, 5, 6], (a, c) => a + c).then(o=>{console.log(o)});
console.log("i executed first");

//asyncFilter(list, filter)
asyncFilter([1, 2, 3, 4, 5, 6], i => i>2).then(o=>{console.log(o)});
console.log("i executed first");
1.1.1

5 years ago

1.1.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago