noflo-promise

Promises/A+ handling in NoFlo

npm install noflo-promise
3 downloads in the last week
12 downloads in the last month

Promises/A+ for NoFlo
Build Status Dependency Status NPM version Stories in Ready

Provide Promises/A+ handling in NoFlo by wrapping around the NPM module promise. It doesn't make sense to create promises in NoFlo because NoFlo itself is the framework to manage your program's flow. Therefore, this package simply provides ways to manipulate existing promises used in parts of your program that are not within NoFlo.

Installation

npm install --save noflo-promise

Usage

Listed in-ports in bold are required and out-ports in bold always produce IPs.

From

Wrapper around Promise#from(1) to convert a non-promise into a promise.

In-Ports

  • IN: The value to convert

Out-Ports

  • OUT: A promise

Then

Accept a promise, set it to forward the passed value to SUCCESS upon fulfillment of the promise or to FAILURE upon rejection, then forward the promise onto OUT if it's attached.

Each passed parameter is forwarded as an IP. For instance, a promise that would look in procedural JS:

promise.then(function(a, b, c) {

... would be translated as three IPs of the values of a, b, and c.

In-Ports

  • IN: A promise

Out-Ports

  • OUT: A promise
  • SUCCESS: Forwarded the passed value on fulfillment
  • FAILURE: Forwarded the passed value on rejection
npm loves you