# start-then-go

> simple, declarative flow control

Latest version **0.9.2** (published 2012-12-30) · 0 weekly downloads

## Install

```sh
npm install start-then-go
pnpm add start-then-go
yarn add start-then-go
bun add start-then-go
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.2 |
| Published | 2012-12-30 |
| First published | 2012-12-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sean Quinlan |
| Maintainers | sbquinlan |
| Keywords | flow, control |

## Links

- npm: https://www.npmjs.com/package/start-then-go
- Repository: https://github.com/sbquinlan/start-then-go
- npm.io page: https://npm.io/package/start-then-go

## Recent versions

- 0.9.2 (latest) — 2012-12-30
- 0.9.1 — 2012-12-30

## README

# Start.Then.Go -- simple JS flow control.

## Install

<pre>
  npm install start-then-go
</pre>

Or from source:

<pre>
  git clone git://github.com/sbquinlan/start-then-go.git 
  cd start-then-go
  npm link
</pre>

## Straightforward.
Flatten your callbacks into an easy to read pipeline that supports parallelism.

```javascript
var stg = require('start-then-go');

stg.start(
  function (_, next) {
    next({ user_id : 123});
  }
).then(
  function (prev, next) {
    http.get(
      'http://someurl.com',
      function (_, _, res) {
        next({page_contents : res});
      }
    );
  },
  function (prev, next) {
    Users.findById(
      prev.user_id, 
      function (err, user) {
        next({user : user});
      }
    );
  }
).then(
  function (prev) {
    console.log(prev);
//    {
//      'page_contents' : '<html>...yadda...</html>',
//      'user' : [Object object]
//    }
  }
).go();
```

There are a handful of these modules on NPM. I just wanted to add mine to the lot.

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