UNPKG

2.73 kBMarkdownView Raw
1control.async
2=============
3
4[![Build Status](https://secure.travis-ci.org/folktale/control.async.png?branch=master)](https://travis-ci.org/folktale/control.async)
5[![NPM version](https://badge.fury.io/js/control.async.png)](http://badge.fury.io/js/control.async)
6[![Dependencies Status](https://david-dm.org/folktale/control.async.png)](https://david-dm.org/folktale/control.async)
7[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges)
8
9
10Operations for asynchronous control flow.
11
12
13## Example
14
15```js
16( ... )
17```
18
19
20## Installing
21
22The easiest way is to grab it from NPM. If you're running in a Browser
23environment, you can use [Browserify][]
24
25 $ npm install control.async
26
27
28### Using with CommonJS
29
30If you're not using NPM, [Download the latest release][release], and require
31the `control.async.umd.js` file:
32
33```js
34var Async = require('control.async')
35```
36
37
38### Using with AMD
39
40[Download the latest release][release], and require the `control.async.umd.js`
41file:
42
43```js
44require(['control.async'], function(Async) {
45 ( ... )
46})
47```
48
49
50### Using without modules
51
52[Download the latest release][release], and load the `control.async.umd.js`
53file. The properties are exposed in the global `Async` object:
54
55```html
56<script src="/path/to/control.async.umd.js"></script>
57```
58
59
60### Compiling from source
61
62If you want to compile this library from the source, you'll need [Git][],
63[Make][], [Node.js][], and run the following commands:
64
65 $ git clone git://github.com/folktale/control.async.git
66 $ cd control.async
67 $ npm install
68 $ make bundle
69
70This will generate the `dist/control.async.umd.js` file, which you can load in
71any JavaScript environment.
72
73
74## Documentation
75
76You can [read the documentation online][docs] or build it yourself:
77
78 $ git clone git://github.com/folktale/monads.maybe.git
79 $ cd monads.maybe
80 $ npm install
81 $ make documentation
82
83Then open the file `docs/literate/index.html` in your browser.
84
85
86## Platform support
87
88This library assumes an ES5 environment, but can be easily supported in ES3
89platforms by the use of shims. Just include [es5-shim][] :)
90
91
92## Licence
93
94Copyright (c) 2013 Quildreen Motta.
95
96Released under the [MIT licence](https://github.com/folktale/control.async/blob/master/LICENCE).
97
98<!-- links -->
99[Fantasy Land]: https://github.com/fantasyland/fantasy-land
100[Browserify]: http://browserify.org/
101[release]: https://github.com/folktale/control.async/releases/download/v0.0.0/control.async-0.0.0.tar.gz
102[Git]: http://git-scm.com/
103[Make]: http://www.gnu.org/software/make/
104[Node.js]: http://nodejs.org/
105[es5-shim]: https://github.com/kriskowal/es5-shim
106[docs]: http://folktale.github.io/control.async