# gaffa-flow

> An action for triggering other actions after a flow of model events occurs

Latest version **2.1.0** (published 2015-04-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install gaffa-flow
pnpm add gaffa-flow
yarn add gaffa-flow
bun add gaffa-flow
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2015-04-24 |
| First published | 2013-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kory Nunn |
| Maintainers | korynunn, mauricebutler |
| Keywords | gaffa, flow, action, parallel |

## Links

- npm: https://www.npmjs.com/package/gaffa-flow
- Repository: https://github.com/KoryNunn/gaffa-flow
- Issues: http://github.com/KoryNunn/gaffa-flow/issues
- npm.io page: https://npm.io/package/gaffa-flow

## Recent versions

- 2.1.0 (latest) — 2015-04-24
- 2.0.1 — 2015-03-24
- 2.0.0 — 2015-03-24
- 1.0.0 — 2014-03-28
- 0.0.8 — 2013-11-01
- 0.0.7 — 2013-11-01
- 0.0.6 — 2013-11-01
- 0.0.5 — 2013-11-01
- 0.0.4 — 2013-11-01
- 0.0.3 — 2013-11-01
- 0.0.2 — 2013-10-31
- 0.0.1 — 2013-10-31

## README

# gaffa-flow

flow action for gaffa

## Install:

    npm i gaffa-flow

## Add to gaffa:

    gaffa.registerConstructor(require('gaffa-flow'));

# API

## Properties (instanceof Gaffa.Property)

### cancel

Binding that, when changed to a truthy value, cancels the flow.

## Properties !(instanceof Gaffa.Property)

### steps

A standard array of bindings that when evaluate to true will trigger the next step to be evaluated.

Once all steps have evaluated to true the success action will be triggered


## Example

    var flow = new Flow();

    flow.steps = [
        '[/foo]',
        '[/bar]'
    ];

    flow.actions.success[someAction];

    // Step 1
    gaffa.model.set('[/foo]', true);

    setTimeout(function(){
        // Step 2
        gaffa.model.set('[/bar]', true);
    }, 1000);

    // After step 2 is set someAction will trigger

---
_Source: https://npm.io/package/gaffa-flow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
