{
  "name": "when",
  "version": "2.1.1",
  "description": "A lightweight Promises/A+ and when() implementation, plus other async goodies.",
  "keywords": [
    "Promises/A+",
    "promises-aplus",
    "promise",
    "promises",
    "deferred",
    "deferreds",
    "when",
    "async",
    "asynchronous",
    "cujo"
  ],
  "homepage": "http://cujojs.com",
  "licenses": [
    {
      "type": "MIT",
      "url": "http://www.opensource.org/licenses/mit-license.php"
    }
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/cujojs/when"
  },
  "bugs": {
    "url": "https://github.com/cujojs/when/issues"
  },
  "maintainers": [
    {
      "name": "Brian Cavalier",
      "url": "http://hovercraftstudios.com"
    },
    {
      "name": "John Hann",
      "url": "http://unscriptable.com"
    }
  ],
  "contributors": [
    {
      "name": "Brian Cavalier",
      "url": "http://hovercraftstudios.com"
    },
    {
      "name": "John Hann",
      "url": "http://unscriptable.com"
    },
    {
      "name": "Scott Andrews"
    }
  ],
  "devDependencies": {
    "curl": "https://github.com/cujojs/curl/tarball/0.7.3",
    "test-support": "~0.2",
    "promises-aplus-tests": "~1"
  },
  "main": "when",
  "directories": {
    "test": "test"
  },
  "scripts": {
    "test": "jshint . && buster test -e node && promises-aplus-tests test/promises-aplus-adapter.js",
    "ci": "npm test && sauceme",
    "start": "buster static -e browser"
  },
  "readme": "<a href=\"http://promises-aplus.github.com/promises-spec\"><img src=\"http://promises-aplus.github.com/promises-spec/assets/logo-small.png\" alt=\"Promises/A+ logo\" align=\"right\" /></a>\n\n[![Build Status](https://secure.travis-ci.org/cujojs/when.png)](http://travis-ci.org/cujojs/when) \n\n# when.js\n\nWhen.js is cujoJS's lightweight [Promises/A+](http://promises-aplus.github.com/promises-spec) and `when()` implementation that powers the async core of [wire.js](https://github.com/cujojs/wire), cujoJS's IOC Container.  It features:\n\n* A rock solid, battle-tested Promise implementation\n* Resolving, settling, mapping, and reducing arrays of promises\n* Executing tasks in parallel and sequence\n* Transforming Node-style and other callback-based APIs into promise-based APIs\n\nIt passes the [Promises/A+ Test Suite](https://github.com/promises-aplus/promises-tests), is [very fast](https://github.com/cujojs/promise-perf-tests#test-results), is under 1.5k when compiled with Google Closure + gzip, and has no external dependencies.\n\n# What's New?\n\n### 2.1.1\n\n* Quote internal usages of `promise.yield` to workaround .NET minifier tools that don't yet understand ES5 identifier-as-property rules.  See [#157](https://github.com/cujojs/when/issues/157)\n\n### 2.1.0\n\n* New [`when.settle`](docs/api.md#whensettle) that settles an array of promises\n* New [`when/guard`](docs/api.md#whenguard) generalized concurrency guarding and limiting\n* New [`promise.inspect`](docs/api.md#inspect) for synchronously getting a snapshot of a promise's state at a particular instant.\n* Significant performance improvements when resolving promises with non-primitives (e.g. with Arrays, Objects, etc.)\n* Experimental [vert.x](http://vertx.io) support\n* **DEPRECATED**: `onFulfilled`, `onRejected`, `onProgress` handler arguments to `when.all`, `when.any`, `when.some`.  Use the returned promise's `then()` (or `otherwise()`, `ensure()`, etc) to register handlers instead.\n\t* For example, do this: `when.all(array).then(onFulfilled, onRejected)` instead of this: `when.all(array, onFulfilled, onRejected)`.  The functionality is equivalent.\n\n### 2.0.1\n\n* Account for the fact that Mocha creates a global named `process`. Thanks [Narsul](https://github.com/cujojs/when/pull/136)\n\n### 2.0.0\n\n* Fully asynchronous resolutions.\n* [Promises/A+](http://promises-aplus.github.com/promises-spec) compliance.\n* New [`when/keys`](docs/api.md#object-keys) module with `all()` and `map()` for object keys/values.\n* New [`promise.ensure`](docs/api.md#ensure) as a better, and safer, replacement for `promise.always`.  [See discussion](https://github.com/cujojs/when/issues/103) as to why `promise.always` is mistake-prone.\n\t* **DEPRECATED:** `promise.always`\n* `lift()` is now the preferred name for what was `bind()` in [when/function](docs/api.md#synchronous-functions), [when/node/function](docs/api.md#node-style-asynchronous-functions), and [when/callbacks](docs/api.md#asynchronous-functions).\n\t* **DEPRECATED:** `bind()` in `when/function`, `when/node/function`, and `when/callbacks`.  Use `lift()` instead.\n\n[Full Changelog](CHANGES.md)\n\n# Docs & Examples\n\n[API docs](docs/api.md#api)\n\n[More info on the wiki](https://github.com/cujojs/when/wiki)\n\n[Examples](https://github.com/cujojs/when/wiki/Examples)\n\nQuick Start\n===========\n\n### AMD\n\n1. Get it\n\t- `bower install when` or `yeoman install when`, *or*\n\t- `git clone https://github.com/cujojs/when` or `git submodule add https://github.com/cujojs/when`\n1. Configure your loader with a package:\n\n\t```js\n\tpackages: [\n\t\t{ name: 'when', location: 'path/to/when/', main: 'when' },\n\t\t// ... other packages ...\n\t]\n\t```\n\n1. `define(['when', ...], function(when, ...) { ... });` or `require(['when', ...], function(when, ...) { ... });`\n\n### Node\n\n1. `npm install when`\n1. `var when = require('when');`\n\n### RingoJS\n\n1. `ringo-admin install cujojs/when`\n1. `var when = require('when');`\n\n### Legacy environments\n\n1. `git clone https://github.com/cujojs/when` or `git submodule add https://github.com/cujojs/when`\n1. Add a transient `define` shim, and a `<script>` element for when.js\n\n\t```html\n\t<script>\n\t\twindow.define = function(factory) {\n\t\t\ttry{ delete window.define; } catch(e){ window.define = void 0; } // IE\n\t\t\twindow.when = factory();\n\t\t};\n\t\twindow.define.amd = {};\n\t</script>\n\t<script src=\"path/to/when/when.js\"></script>\n\t```\n\n1. `when` will be available as `window.when`\n\n# Running the Unit Tests\n\n## Node\n\nNote that when.js includes the [Promises/A+ Test Suite](https://github.com/promises-aplus/promise-tests).  Running unit tests in Node will run both when.js's own test suite, and the Promises/A+ Test Suite.\n\n1. `npm install`\n1. `npm test`\n\n## Browsers\n\n1. `npm install`\n1. `npm start` - starts buster server & prints a url\n1. Point browsers at <buster server url>/capture, e.g. `localhost:1111/capture`\n1. `npm run-script test-browser`\n\nReferences\n----------\n\nMuch of this code was inspired by the async innards of [wire.js](https://github.com/cujojs/wire), and has been influenced by the great work in [Q](https://github.com/kriskowal/q), [Dojo's Deferred](https://github.com/dojo/dojo), and [uber.js](https://github.com/phiggins42/uber.js).\n",
  "readmeFilename": "README.md",
  "_id": "when@2.1.1",
  "dist": {
    "shasum": "282d52873f1c771334f2c7b004390efdc31cff6e"
  },
  "_from": "when@2.1.1",
  "_resolved": "https://registry.npmjs.org/when/-/when-2.1.1.tgz"
}
