# pinky-combinators

> Sweet combinators for promises/a+

Latest version **0.1.1** (published 2013-03-31) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install pinky-combinators
pnpm add pinky-combinators
yarn add pinky-combinators
bun add pinky-combinators
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2013-03-31 |
| First published | 2013-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Quildreen "Sorella" Motta |
| Maintainers | killdream |

## Links

- npm: https://www.npmjs.com/package/pinky-combinators
- Repository: https://github.com/killdream/pinky-combinators
- npm.io page: https://npm.io/package/pinky-combinators

## Dependencies (1)

- [pinky](https://npm.io/package/pinky.md) ~0.1.2

## Recent versions

- 0.1.1 (latest) — 2013-03-31
- 0.1.0 — 2013-03-30
- 0.0.0 — 2013-03-30

## README

# Pinky Combinators [![Build Status](https://travis-ci.org/killdream/pinky-combinators.png)](https://travis-ci.org/killdream/pinky-combinators) ![Dependencies Status](https://david-dm.org/killdream/pinky-combinators.png)

Sweet combinators for promises/a+.

Even though it uses pinky under the covers, it should be interoperable with any
library implementing the promises/a+ specification.


### Platform support

This library assumes an ES5 environment, but can be easily supported in ES3
platforms by the use of shims. Just include [es5-shim][] :3

[![browser support](http://ci.testling.com/killdream/pinky-combinators.png)](http://ci.testling.com/killdream/pinky-combinators)


### Example

```js
var pinky = require('pinky')
var p = require('pinky-combinators')

// Sequencing operations
p.pipeline([ read('user.json')
           , JSON.parse
           , get('data')
           , JSON.stringify
           , write('data.json') ])
 .otherwise(function(e){ throw e })

// Or function-composition style f . g
p.compose([ splitLines, read('log.txt') ])
 .then(function(lines){ ... })

// Parallel computations
p.all([ read('a.txt'), read('b.txt'), read('c.txt') ])
 .then( function(as)  { console.log(as.join('\n')) }
      , function(err) { throw err                  })
 
// First come, first served
p.any([ request('http://api.example.com/foo')
      , request('http://api2.example.com/foo') ])
 .then(function(a){ saveToDatabase(a) }, function(err){ throw err })
```


### Installing

Just grab it from NPM:

    $ npm install pinky-combinators


### Documentation

A quick reference of the API can be built using [Calliope][]:

    $ npm install -g calliope
    $ calliope build


### Tests

You can run all tests using Mocha:

    $ npm test


### Licence

MIT/X11. ie.: do whatever you want.

[Calliope]: https://github.com/killdream/calliope
[es5-shim]: https://github.com/kriskowal/es5-shim

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