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

can-queues

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-queues - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

2

package.json
{
"name": "can-queues",
"version": "0.2.7",
"version": "0.2.8",
"description": "A light weight JavaScript task queue",

@@ -5,0 +5,0 @@ "homepage": "",

var queueState = require("./queue-state");
var canDev = require('can-util/js/dev/dev');
var noop = function() {};
function noOperation() {};
var Queue = function(name, callbacks) {
this.callbacks = Object.assign({
onFirstTask: noop,
onFirstTask: noOperation,
// default clears the last task

@@ -19,4 +19,5 @@ onComplete: function(){

};
Queue.noop = noOperation;
Queue.prototype.enqueue = function(fn, context, args, meta) {
this.tasks.push({
var len = this.tasks.push({
fn: fn,

@@ -28,6 +29,6 @@ context: context,

//!steal-remove-start
this._logEnqueue(this.tasks[this.tasks.length - 1]);
this._logEnqueue(this.tasks[len - 1]);
//!steal-remove-end
if (this.tasks.length === 1) {
if (len === 1) {
this.callbacks.onFirstTask(this);

@@ -34,0 +35,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