Socket
Socket
Sign inDemoInstall

when

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

when - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

78

package.json
{
"name": "when",
"version": "1.5.1",
"description": "A lightweight Promise and when() implementation, plus other async goodies.",
"keywords": ["promise", "promises", "deferred", "deferreds", "when", "async", "asynchronous", "cujo"],
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"repositories": [
{
"type": "git",
"url": "https://github.com/cujojs/when"
}
],
"bugs": "https://github.com/cujojs/when/issues",
"maintainers": [
{
"name": "Brian Cavalier",
"web": "http://hovercraftstudios.com"
},
{
"name": "John Hann",
"web": "http://unscriptable.com"
}
],
"devDependencies": {
"buster": "~0.6"
},
"main": "when",
"directories": {
"test": "test"
},
"scripts": {
"test": "./node_modules/buster/bin/buster-test -e node"
}
"name": "when",
"version": "1.5.2",
"description": "A lightweight Promise and when() implementation, plus other async goodies.",
"keywords": ["promise", "promises", "deferred", "deferreds", "when", "async", "asynchronous", "cujo"],
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
],
"repositories": [
{
"type": "git",
"url": "https://github.com/cujojs/when"
}
],
"bugs": "https://github.com/cujojs/when/issues",
"maintainers": [
{
"name": "Brian Cavalier",
"web": "http://hovercraftstudios.com"
},
{
"name": "John Hann",
"web": "http://unscriptable.com"
}
],
"devDependencies": {
"buster": "~0.6",
"promise-tests": "*"
},
"main": "when",
"directories": {
"test": "test"
},
"scripts": {
"test": "buster test -e node && promise-tests promises-a test/when-adapter.js",
"test-all": "buster test -e node && promise-tests all test/when-adapter.js",
"start": "buster server",
"test-browser": "buster test -e browser"
}
}
# when.js [![Build Status](https://secure.travis-ci.org/cujojs/when.png)](http://travis-ci.org/cujojs/when)
A lightweight [CommonJS](http://wiki.commonjs.org/wiki/Promises) [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) and `when()` implementation. It also provides several other useful Promise-related concepts, such as joining, mapping and reducing, and has a robust unit test suite.
When.js is cujojs's lightweight [CommonJS](http://wiki.commonjs.org/wiki/Promises) [Promises/A](http://wiki.commonjs.org/wiki/Promises/A) and `when()` implementation, derived from the async core of [wire.js](https://github.com/cujojs/wire), cujojs's IOC Container. It also provides several other useful Promise-related concepts, such as joining multiple promises, mapping and reducing collections of promises, timed promises, and has a robust [unit test suite](#running-the-unit-tests).
It's **under 1.3k** when compiled with Google Closure (w/advanced optimizations) and gzipped, and has no dependencies.
It passes the [Promises/A Test Suite](https://github.com/domenic/promise-tests), is [frighteningly fast](https://github.com/cujojs/promise-perf-tests#test-results), and is **under 1.3k** when compiled with Google Closure (w/advanced optimizations) and gzipped, and has no dependencies.
when.js was derived from the async core of [wire.js](https://github.com/cujojs/wire).
# What's New?
What's New?
===========
### 1.5.2
* Integrate @domenic's [Promises/A Test Suite](https://github.com/domenic/promise-tests). Runs via `npm test`.
* No functional change
### 1.5.1

@@ -25,10 +27,5 @@

### 1.4.4
* Change UMD boilerplate to check for `exports` to avoid a problem with QUnit. See [#54](https://github.com/cujojs/when/issues/54) for more info.
[Full Changelog](https://github.com/cujojs/when/wiki/Changelog)
Docs & Examples
===============
# Docs & Examples

@@ -74,19 +71,18 @@ [API docs](when/blob/master/docs/api.md#api)

Running the Unit Tests
======================
# Running the Unit Tests
Install [buster.js](http://busterjs.org/)
## Node
`npm install -g buster`
Note that when.js includes @domenic's [Promises/A Test Suite](https://github.com/domenic/promise-tests). Running unit tests in Node will run both when.js's own test suite, and the Promises/A Test Suite.
Run unit tests in Node:
1. `npm install`
1. `npm test`
1. `buster test -e node`
## Browsers
Run unit tests in Browsers (and Node):
1. `npm install`
1. `npm start` - starts buster server & prints a url
1. Point browsers at <buster server url>/capture, e.g. `localhost:1111/capture`
1. `npm run-script test-browser`
1. `buster server` - this will print a url
2. Point browsers at <buster server url>/capture, e.g. `localhost:1111/capture`
3. `buster test` or `buster test -e browser`
References

@@ -93,0 +89,0 @@ ----------

@@ -10,3 +10,3 @@ /** @license MIT License (c) copyright B Cavalier & J Hann */

*
* @version 1.5.1
* @version 1.5.2
*/

@@ -220,3 +220,3 @@

});
return freeze(p);

@@ -256,3 +256,3 @@ }

progress: promiseProgress,
promise: freeze(promise),

@@ -518,3 +518,3 @@

} else {
reject = d.reject;

@@ -565,3 +565,3 @@ resolve = function resolveOne(item, i) {

var args = slice.call(arguments, 1);
return when(promise, function(array) {

@@ -568,0 +568,0 @@ var total;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc