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