Skip to content

Commit

Permalink
Merge pull request #3 from mudge/browser-support
Browse files Browse the repository at this point in the history
Add Browser Support
  • Loading branch information
mudge committed Aug 4, 2013
2 parents edd7bb6 + 457fc61 commit f417cec
Show file tree
Hide file tree
Showing 9 changed files with 825 additions and 644 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
bower_components
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# pacta [![Build Status](https://travis-ci.org/mudge/pacta.png?branch=master)](https://travis-ci.org/mudge/pacta)

```javascript
{ 'pacta': '0.2.0' }
{ 'pacta': '0.3.0' }
```

```shell
$ npm install pacta # for node
$ bower install pacta # for the browser
```

This is an implementation of [algebraic][Fantasy Land], [Promises/A+][A+]
compliant Promises in [node.js](http://nodejs.org).
compliant Promises in JavaScript (both for the browser and
[node.js](http://nodejs.org)).

Promises can be thought of as objects representing a value that may not have
been calculated yet (they are sometimes referred to as `Deferred`s).
Expand All @@ -19,7 +25,8 @@ time or sequence of execution.
At their most basic, an empty promise can be created and resolved like so:

```javascript
var Promise = require('pacta').Promise;
/* Include pacta.js or require explicitly in node.js: */
var Promise = require('pacta');

var p = new Promise();
setTimeout(function () {
Expand Down Expand Up @@ -124,7 +131,7 @@ information.
## Usage

```javascript
var Promise = require('pacta').Promise;
var Promise = require('pacta');

var p = new Promise();
setTimeout(function () {
Expand Down
19 changes: 19 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "pacta",
"description": "An algebraic, Promises/A+ compliant implementation of Promises.",
"keywords": ["promises", "monad", "functor", "promises-aplus"],
"authors": ["Paul Mucur"],
"version": "0.3.0",
"main": "lib/pacta.js",
"devDependencies": {
"mocha": "1.12.0",
"proclaim": "1.5.0"
},
"ignore": [
"bower_components",
"node_modules",
"example",
"images",
"test"
]
}
Loading

0 comments on commit f417cec

Please sign in to comment.