natron-core

0.2.0-beta.5 • Public • Published

Natron

Tasks with Promises

Version Downloads Build Status Readme

Gitter Chat

This module is part of Natron and contains the core functionality of the task runner.

Documentation

See the documentation for natron-core.

Usage

import {task} from "natron-core";
 
function fn1(x) { return x * 1; }
function fn2(x) { return x * 2; }
function fn3(x) { return x * 3; }
 
// => fn1(2) -> (fn2(2) || fn3(2))
(task([fn1, [[fn2, fn3]]]).run(2)
  .then((res) => {
    // res = [2, [4, 6]]
  })
  .catch((err) => {
    // handle error
  })
);

Package Sidebar

Install

npm i natron-core

Weekly Downloads

1

Version

0.2.0-beta.5

License

MIT

Last publish

Collaborators

  • natron
  • stefanr