Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update up to changes in es5-ext

  • Loading branch information...
commit 431a1e3452a1daa517b99b878379c79c7a97b35f 1 parent eb754be
@medikoo authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 ext/function/gate.js
  2. +2 −2 monitor.js
View
6 ext/function/gate.js
@@ -5,7 +5,7 @@
'use strict';
-var toUint = require('es5-ext/number/to-uint')
+var toPosInt = require('es5-ext/number/to-pos-integer')
, callable = require('es5-ext/object/valid-callable')
, eeUnify = require('event-emitter/lib/unify')
, deferred = require('../../deferred')
@@ -27,8 +27,8 @@ gateReject = function () {
module.exports = function (cLimit, qLimit) {
var fn, count, decrement, unload, queue, run, result;
fn = callable(this);
- cLimit = max(toUint(cLimit), 1);
- qLimit = ((qLimit == null) || isNaN(qLimit)) ? Infinity : toUint(qLimit);
+ cLimit = max(toPosInt(cLimit), 1);
+ qLimit = ((qLimit == null) || isNaN(qLimit)) ? Infinity : toPosInt(qLimit);
count = 0;
queue = [];
View
4 monitor.js
@@ -6,7 +6,7 @@
var max = Math.max
, callable = require('es5-ext/object/valid-callable')
, isCallable = require('es5-ext/object/is-callable')
- , toUint = require('es5-ext/number/to-uint')
+ , toPosInt = require('es5-ext/number/to-pos-integer')
, deferred = require('./deferred');
exports = module.exports = function (timeout, cb) {
@@ -17,7 +17,7 @@ exports = module.exports = function (timeout, cb) {
delete exports.callback;
return;
}
- exports.timeout = timeout = max(toUint(timeout) || 5000, 50);
+ exports.timeout = timeout = max(toPosInt(timeout) || 5000, 50);
if (cb == null) {
if ((typeof console !== 'undefined') && console &&
isCallable(console.error)) {
Please sign in to comment.
Something went wrong with that request. Please try again.