# chainesis

> Chain functions and proceed by calling next

Latest version **0.0.3** (published 2019-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install chainesis
pnpm add chainesis
yarn add chainesis
bun add chainesis
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-08-13 |
| First published | 2019-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 53.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Michiel de Vos |
| Maintainers | michiel87 |
| Keywords | cps, continuation, passing, style, chains, callback |

## Links

- npm: https://www.npmjs.com/package/chainesis
- Repository: https://github.com/Michiel87/chains
- Homepage: https://github.com/Michiel87/chains#readme
- Issues: https://github.com/Michiel87/chains/issues
- npm.io page: https://npm.io/package/chainesis

## Recent versions

- 0.0.3 (latest) — 2019-08-13
- 0.0.2 — 2019-08-13
- 0.0.1 — 2019-08-13

## README

chainesis
=============

Chain functions to other functions.

Installation
------------

_npm_

```
npm install --save chainesis
```

_yarn_

```
yarn add chainesis
```

API
---

### `chain`

```jsx
import { chain } from 'chainesis'

const [hookOnChain, runChain] = chain((runChainArg, next) => {
 // do something
 // pass something to next function
 next(something)
})

// chained to chain
hookOnChain((something, next) => {
 // Do new stuff with something from root function
 next(new stuff)
})

// chained to chain
const [hookOnSecond, hookOff] = hookOnChain((something, next) => {
 // Do new stuff with something from root function
 next(new stuff)
})

// chained to hookOnChain
const [goOnForeverHook, hookOffBranchToo] = hookOnSecond((argsFromHookOnChain, next) => {
 // here we go again!
  next(indefinitely)   
})

````
License
-------

MIT

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