Socket
Socket
Sign inDemoInstall

d3-queue

Package Overview
Dependencies
0
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.5 to 3.0.6

13

build/d3-queue.js

@@ -1,2 +0,2 @@

// https://d3js.org/d3-queue/ Version 3.0.5. Copyright 2017 Mike Bostock.
// https://d3js.org/d3-queue/ Version 3.0.6. Copyright 2017 Mike Bostock.
(function (global, factory) {

@@ -13,3 +13,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

function Queue(size) {
if (!(size >= 1)) throw new Error;
if (!((size = +size) >= 1)) throw new Error("invalid size");
this._size = size;

@@ -29,3 +29,4 @@ this._call =

defer: function(callback) {
if (typeof callback !== "function" || this._call) throw new Error;
if (typeof callback !== "function") throw new Error("invalid callback");
if (this._call) throw new Error("defer after await");
if (this._error != null) return this;

@@ -43,3 +44,4 @@ var t = slice.call(arguments, 1);

await: function(callback) {
if (typeof callback !== "function" || this._call) throw new Error;
if (typeof callback !== "function") throw new Error("invalid callback");
if (this._call) throw new Error("multiple await");
this._call = function(error, results) { callback.apply(null, [error].concat(results)); };

@@ -50,3 +52,4 @@ maybeNotify(this);

awaitAll: function(callback) {
if (typeof callback !== "function" || this._call) throw new Error;
if (typeof callback !== "function") throw new Error("invalid callback");
if (this._call) throw new Error("multiple await");
this._call = callback;

@@ -53,0 +56,0 @@ maybeNotify(this);

@@ -1,2 +0,2 @@

// https://d3js.org/d3-queue/ Version 3.0.5. Copyright 2017 Mike Bostock.
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){if(!(t>=1))throw new Error;this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function n(t){if(!t._start)try{r(t)}catch(i){if(t._tasks[t._ended+t._active-1])a(t,i);else if(!t._data)throw i}}function r(t){for(;t._start=t._waiting&&t._active<t._size;){var i=t._ended+t._active,n=t._tasks[i],r=n.length-1,a=n[r];n[r]=e(t,i),--t._waiting,++t._active,n=a.apply(null,n),t._tasks[i]&&(t._tasks[i]=n||c)}}function e(t,i){return function(r,e){t._tasks[i]&&(--t._active,++t._ended,t._tasks[i]=null,null==t._error&&(null!=r?a(t,r):(t._data[i]=e,t._waiting?n(t):s(t))))}}function a(t,i){var n,r=t._tasks.length;for(t._error=i,t._data=void 0,t._waiting=NaN;--r>=0;)if((n=t._tasks[r])&&(t._tasks[r]=null,n.abort))try{n.abort()}catch(t){}t._active=NaN,s(t)}function s(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function o(t){return new i(arguments.length?+t:1/0)}var _=[].slice,c={};i.prototype=o.prototype={constructor:i,defer:function(t){if("function"!=typeof t||this._call)throw new Error;if(null!=this._error)return this;var i=_.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),n(this),this},abort:function(){return null==this._error&&a(this,new Error("abort")),this},await:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=function(i,n){t.apply(null,[i].concat(n))},s(this),this},awaitAll:function(t){if("function"!=typeof t||this._call)throw new Error;return this._call=t,s(this),this}},t.queue=o,Object.defineProperty(t,"__esModule",{value:!0})});
// https://d3js.org/d3-queue/ Version 3.0.6. Copyright 2017 Mike Bostock.
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function i(t){if(!((t=+t)>=1))throw new Error("invalid size");this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function r(t){if(!t._start)try{a(t)}catch(i){if(t._tasks[t._ended+t._active-1])e(t,i);else if(!t._data)throw i}}function a(t){for(;t._start=t._waiting&&t._active<t._size;){var i=t._ended+t._active,r=t._tasks[i],a=r.length-1,e=r[a];r[a]=n(t,i),--t._waiting,++t._active,r=e.apply(null,r),t._tasks[i]&&(t._tasks[i]=r||_)}}function n(t,i){return function(a,n){t._tasks[i]&&(--t._active,++t._ended,t._tasks[i]=null,null==t._error&&(null!=a?e(t,a):(t._data[i]=n,t._waiting?r(t):o(t))))}}function e(t,i){var r,a=t._tasks.length;for(t._error=i,t._data=void 0,t._waiting=NaN;--a>=0;)if((r=t._tasks[a])&&(t._tasks[a]=null,r.abort))try{r.abort()}catch(i){}t._active=NaN,o(t)}function o(t){if(!t._active&&t._call){var i=t._data;t._data=void 0,t._call(t._error,i)}}function s(t){return new i(arguments.length?+t:1/0)}var l=[].slice,_={};i.prototype=s.prototype={constructor:i,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var i=l.call(arguments,1);return i.push(t),++this._waiting,this._tasks.push(i),r(this),this},abort:function(){return null==this._error&&e(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(i,r){t.apply(null,[i].concat(r))},o(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,o(this),this}},t.queue=s,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-queue",
"version": "3.0.5",
"version": "3.0.6",
"description": "Evaluate asynchronous tasks with configurable concurrency.",

@@ -33,3 +33,3 @@ "keywords": [

"eslint": "3",
"package-preamble": "0.0",
"package-preamble": "0.1",
"rollup": "0.41",

@@ -36,0 +36,0 @@ "tape": "4",

@@ -6,3 +6,3 @@ import {slice} from "./array";

function Queue(size) {
if (!(size >= 1)) throw new Error;
if (!((size = +size) >= 1)) throw new Error("invalid size");
this._size = size;

@@ -22,3 +22,4 @@ this._call =

defer: function(callback) {
if (typeof callback !== "function" || this._call) throw new Error;
if (typeof callback !== "function") throw new Error("invalid callback");
if (this._call) throw new Error("defer after await");
if (this._error != null) return this;

@@ -36,3 +37,4 @@ var t = slice.call(arguments, 1);

await: function(callback) {
if (typeof callback !== "function" || this._call) throw new Error;
if (typeof callback !== "function") throw new Error("invalid callback");
if (this._call) throw new Error("multiple await");
this._call = function(error, results) { callback.apply(null, [error].concat(results)); };

@@ -43,3 +45,4 @@ maybeNotify(this);

awaitAll: function(callback) {
if (typeof callback !== "function" || this._call) throw new Error;
if (typeof callback !== "function") throw new Error("invalid callback");
if (this._call) throw new Error("multiple await");
this._call = callback;

@@ -46,0 +49,0 @@ maybeNotify(this);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc