sanctuary-processP
Adds synchronous and async / await process functionality to sanctuary. A process waits for all of its tasks to be finished.
Example
// Import sanctuary.
const Sanctuary = require('sanctuary');
// Import processP and env from sanctuary-processP
const { processP, env } = require('sanctuary-processP');
// Setup Sanctuary environment to include sanctuary-processP Promise type.
const S = Sanctuary.create({
checkTypes: true,
env: Sanctuary.env.concat(env)
});
// create list of processes
const processes = processP([
(x => Promise.resolve(x + 1)),
S.add(2)
]);
// enjoy
processes(1).then(console.log); // should output [2, 3]