All Projects → metarhia → do

metarhia / do

Licence: MIT license
Simplest way to manage asynchronicity

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to do

Metasync
Asynchronous Programming Library for JavaScript & Node.js
Stars: ✭ 164 (+396.97%)
Mutual labels:  asynchronous, promise, chain, composition, parallel, callback, series
ProtoPromise
Robust and efficient library for management of asynchronous operations in C#/.Net.
Stars: ✭ 20 (-39.39%)
Mutual labels:  promise, parallel, callback, await
WebsocketPromisify
Makes websocket's API just like REST with Promise-like API, with native Promises.
Stars: ✭ 18 (-45.45%)
Mutual labels:  asynchronous, promise, thenable, await
lightflow
A tiny Promise-inspired control flow library for browser and Node.js.
Stars: ✭ 29 (-12.12%)
Mutual labels:  promise, chain, parallel, callback
Bach
Compose your async functions with elegance.
Stars: ✭ 117 (+254.55%)
Mutual labels:  promise, parallel, callback, series
Rubico
[a]synchronous functional programming
Stars: ✭ 133 (+303.03%)
Mutual labels:  asynchronous, promise, parallel, series
metacom
RPC communication protocol for Metarhia stack 🔌
Stars: ✭ 42 (+27.27%)
Mutual labels:  highload, metarhia, impress
P Map
Map over promises concurrently
Stars: ✭ 639 (+1836.36%)
Mutual labels:  promise, parallel, await
Flowa
🔥Service level control flow for Node.js
Stars: ✭ 66 (+100%)
Mutual labels:  promise, parallel, series
relaks
Asynchrounous React component
Stars: ✭ 49 (+48.48%)
Mutual labels:  asynchronous, promise, await
cpsfy
🚀 Tiny goodies for Continuation-Passing-Style functions, fully tested
Stars: ✭ 58 (+75.76%)
Mutual labels:  asynchronous, composition, callback
Promise
Asynchronous Programming with Promises
Stars: ✭ 15 (-54.55%)
Mutual labels:  asynchronous, promise, await
Asyncro
⛵️ Beautiful Array utilities for ESnext async/await ~
Stars: ✭ 487 (+1375.76%)
Mutual labels:  asynchronous, promise, parallel
cephgeorep
An efficient unidirectional remote backup daemon for CephFS.
Stars: ✭ 27 (-18.18%)
Mutual labels:  asynchronous, parallel, synchronous
Thunks
A small and magical composer for all JavaScript asynchronous.
Stars: ✭ 523 (+1484.85%)
Mutual labels:  asynchronous, promise, callback
common
Metarhia Common Library
Stars: ✭ 55 (+66.67%)
Mutual labels:  callback, metarhia, impress
Coerce Rs
Coerce - an asynchronous (async/await) Actor runtime and cluster framework for Rust
Stars: ✭ 231 (+600%)
Mutual labels:  asynchronous, await
promise4j
Fluent promise framework for Java
Stars: ✭ 20 (-39.39%)
Mutual labels:  asynchronous, promise
spellbook
Functional library for Javascript
Stars: ✭ 14 (-57.58%)
Mutual labels:  asynchronous, parallel
Future.apply
🚀 R package: future.apply - Apply Function to Elements in Parallel using Futures
Stars: ✭ 159 (+381.82%)
Mutual labels:  asynchronous, parallel

"do" is the simplest way to manage asynchronicity

CI Status NPM Version NPM Downloads/Month NPM Downloads

If you don't want to use all the async/chain libraries but just want a reliable way to know when the function is done - this is for you.

Installation

npm i do

Usage

Series async execution

const chain = require('do');

const c1 = chain
  .do(readConfig, 'myConfig')
  .do(selectFromDb, 'select * from cities')
  .do(getHttpPage, 'http://kpi.ua')
  .do(readFile, 'README.md');

c1((err, result) => {
  console.log('done');
  if (err) console.log(err);
  else console.dir({ result });
});

Data collector

const chain = require('do');
const fs = require('fs');

const dc = chain.do(6);

dc('user', null, { name: 'Marcus Aurelius' });
fs.readFile('HISTORY.md', (err, data) => dc.collect('history', err, data));
fs.readFile('README.md', dc.callback('readme'));
fs.readFile('README.md', dc('readme'));
dc.take('readme', fs.readFile, 'README.md');
setTimeout(() => dc.pick('timer', { date: new Date() }), 1000);

Run tests

npm test

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].