Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

listen

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

listen - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

11

package.json
{
"name" : "listen",
"version" : "0.1.2",
"version" : "0.1.3",
"description" : "Wait for the results of multiple callbacks",

@@ -9,3 +9,3 @@ "author" : "Maximilian Antoni (http://maxantoni.de)",

"engines" : {
"node" : "0.6"
"node" : ">=0.6"
},

@@ -20,5 +20,6 @@ "scripts" : {

"devDependencies" : {
"utest" : "0.0.x",
"urun" : "0.0.x",
"sinon" : "1.3.x"
"utest" : "~0.0.6",
"urun" : "~0.0.6",
"sinon" : "~1.3.4",
"uglify-js" : "~1.2.6"
},

@@ -25,0 +26,0 @@ "nomo" : {

@@ -11,3 +11,3 @@ # listen.js

npm install listen
````
```

@@ -24,3 +24,11 @@ ## Usage

// ... do async stuff with callbacks
/*
* Do async stuff with callbacks.
*
* Callbacks follow the Node.js convention. They expect an error or null as
* the first argument and an optional value as the second:
*
* Fail: callback(new Error('ouch!'));
* Return: callback(null, 'some return value');
*/

@@ -41,14 +49,9 @@ listener.then(function (err, values) {

`listen()` - creates a new listener.
- `listen()` - creates a new listener.
- `listen(values)` - creates a new listener with initial values. The given argument must be an array.
- `listener()` - creates a new callback associated with the listener. Throws if called after `then`.
- `listener.then(func)` - invokes the given function once all callbacks where invoked. Throws if already called.
- `listener.push(value)` - pushes a value to the internal values array. Throws if called after `then`.
- `listener.err(error)` - adds an error to the internal error list. Throws if called after `then`.
`listen(values)` - creates a new listener with initial values. The given argument must be an array.
`listener()` - creates a new callback associated with the listener. Throws if called after `then`.
`listener.then(func)` - invokes the given function once all callbacks where invoked. Throws if already called.
`listener.push(value)` - pushes a value to the internal values array. Throws if called after `then`.
`listener.err(error)` - adds an error to the internal error list. Throws if called after `then`.
## Run tests

@@ -60,3 +63,3 @@

## Compile for browsers
## Compile for browsers and minify

@@ -63,0 +66,0 @@ This requires [nomo.js](https://github.com/mantoni/nomo.js).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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