New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sinon-dist

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sinon-dist - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

2

package.json
{
"name": "sinon-dist",
"description": "Standalone builds of Sinon.js",
"version": "0.7.1",
"version": "0.7.2",
"homepage": "https://github.com/CodeYellowBV/sinon-dist#readme",

@@ -6,0 +6,0 @@ "main": "sinon.js",

/**
* Sinon.JS 0.7.1, 2010/10/16
* Sinon.JS 0.7.2, 2010/10/25
*

@@ -1068,2 +1068,36 @@ * @author Christian Johansen (christian@cjohansen.no)

function callbacksInRange(timeouts, from, to) {
var found, timer, tmp, i, l, timers = [], timeoutsCopy = {};
for (var prop in timeouts) {
timeoutsCopy[prop] = timeouts[prop];
}
while (timeoutsCopy && found !== 0) {
found = 0;
tmp = timersInRange(timeoutsCopy, from, to);
for (i = 0, l = tmp.length; i < l; i++) {
timer = tmp[i];
// Push a copy onto the call stack
timers.push({
func: timer.func,
callAt: timer.callAt,
interval: timer.interval,
id: timer.id
});
if (typeof timer.interval == "number") {
found += 1;
timer.callAt += timer.interval;
} else {
delete timeoutsCopy[timer.id];
}
}
}
return timers;
}
function parseTime(str) {

@@ -1145,31 +1179,5 @@ if (!str) {

ms = typeof ms == "number" ? ms : parseTime(ms);
var found, timer, prop, i, l;
var tickFrom = this.now, tickTo = this.now + ms;
var tmp, timers = [];
while (this.timeouts && found !== 0) {
found = 0;
tmp = timersInRange(this.timeouts, tickFrom, tickTo);
for (i = 0, l = tmp.length; i < l; i++) {
timer = tmp[i];
// Push a copy onto the call stack
timers.push({
func: timer.func,
callAt: timer.callAt,
interval: timer.interval,
id: timer.id
});
if (typeof timer.interval == "number") {
found += 1;
timer.callAt += timer.interval;
} else {
delete this.timeouts[prop];
}
}
}
timers = timers.sort(function (a, b) {
var timers = callbacksInRange(this.timeouts, tickFrom, tickTo).sort(function (a, b) {
return a.callAt < b.callAt ? -1 : (a.callAt > b.callAt ? 1 : 0);

@@ -1949,2 +1957,6 @@ });

return obj;
},
create: function () {
return sinon.create(sinon.sandbox);
}

@@ -1951,0 +1963,0 @@ });

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