Socket
Socket
Sign inDemoInstall

oath

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

oath - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

5

History.md
0.0.3 / 2011-10-04
==================
* bugfix: skip pending that don't have required response callback
0.0.2 / 2011-10-04

@@ -3,0 +8,0 @@ ==================

6

lib/oath.js

@@ -13,3 +13,3 @@ /*!

*/
exports.version = '0.0.2';
exports.version = '0.0.3';

@@ -183,5 +183,7 @@

Oath.prototype.complete = function (type, result) {
var fn;
while (this.pending[0]) {
this.pending.shift()[type](result);
fn = this.pending.shift()[type];
if (fn && 'function' === typeof fn) fn(result);
}
};

@@ -5,3 +5,3 @@ {

"description": "Tiny promises.",
"version": "0.0.2",
"version": "0.0.3",
"homepage": "http://logicalparadox.github.com/oath",

@@ -8,0 +8,0 @@ "repository": {

@@ -27,6 +27,7 @@ var assert = require('assert'),

promise({ doctor: 'who' }).then(success, failure);
promise({ doctor: 'who' })
.then(success, failure);
this.on('exit', function () {
assert.equal(n, 1, 'the success function has been called');
assert.equal(n, 1, 'the success function has been called twice');
});

@@ -53,6 +54,7 @@ },

promise({ doctor: 'who' }).then(success, failure);
promise({ doctor: 'who' })
.then(success) // if no failure object skip
.then(success, failure);
this.on('exit', function () {
assert.equal(n, -1, 'the success function has been called');
assert.equal(n, -1, 'i have successfully failed');
});

@@ -59,0 +61,0 @@ },

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