Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-request

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-request - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

2

build/bundle.js

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

var version = "0.4.1"; export * from "../index"; export {version};
var version = "0.4.2"; export * from "../index"; export {version};

@@ -35,3 +35,3 @@ (function (global, factory) {

} catch (e) {
event.error.call(request, e);
event.call("error", request, e);
return;

@@ -42,5 +42,5 @@ }

}
event.load.call(request, result);
event.call("load", request, result);
} else {
event.error.call(request, o);
event.call("error", request, o);
}

@@ -50,3 +50,3 @@ }

xhr.onprogress = function(e) {
event.progress.call(request, e);
event.call("progress", request, e);
};

@@ -112,3 +112,3 @@

if (callback) request.on("error", callback).on("load", function(xhr) { callback(null, xhr); });
event.beforesend.call(request, xhr);
event.call("beforesend", request, xhr);
xhr.send(data == null ? null : data);

@@ -192,3 +192,3 @@ return request;

var version = "0.4.1";
var version = "0.4.2";

@@ -195,0 +195,0 @@ exports.version = version;

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

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-collection"),require("d3-dispatch"),require("d3-dsv")):"function"==typeof define&&define.amd?define(["exports","d3-collection","d3-dispatch","d3-dsv"],n):n(e.d3_request={},e.d3_collection,e.d3_dispatch,e.d3_dsv)}(this,function(e,n,t,r){"use strict";function o(e,r){function o(e){var n,t=d.status;if(!t&&s(d)||t>=200&&300>t||304===t){if(l)try{n=l.call(i,d)}catch(r){return void p.error.call(i,r)}else n=d;p.load.call(i,n)}else p.error.call(i,e)}var i,a,l,c,p=t.dispatch("beforesend","progress","load","error"),f=n.map(),d=new XMLHttpRequest,m=0;return"undefined"==typeof XDomainRequest||"withCredentials"in d||!/^(http(s)?:)?\/\//.test(e)||(d=new XDomainRequest),"onload"in d?d.onload=d.onerror=d.ontimeout=o:d.onreadystatechange=function(e){d.readyState>3&&o(e)},d.onprogress=function(e){p.progress.call(i,e)},i={header:function(e,n){return e=(e+"").toLowerCase(),arguments.length<2?f.get(e):(null==n?f.remove(e):f.set(e,n+""),i)},mimeType:function(e){return arguments.length?(a=null==e?null:e+"",i):a},responseType:function(e){return arguments.length?(c=e,i):c},timeout:function(e){return arguments.length?(m=+e,i):m},response:function(e){return l=e,i},get:function(e,n){return i.send("GET",e,n)},post:function(e,n){return i.send("POST",e,n)},send:function(n,t,r){return r||"function"!=typeof t||(r=t,t=null),r&&1===r.length&&(r=u(r)),d.open(n,e,!0),null==a||f.has("accept")||f.set("accept",a+",*/*"),d.setRequestHeader&&f.each(function(e,n){d.setRequestHeader(n,e)}),null!=a&&d.overrideMimeType&&d.overrideMimeType(a),null!=c&&(d.responseType=c),m>0&&(d.timeout=m),r&&i.on("error",r).on("load",function(e){r(null,e)}),p.beforesend.call(i,d),d.send(null==t?null:t),i},abort:function(){return d.abort(),i},on:function(){var e=p.on.apply(p,arguments);return e===p?i:e}},r?i.get(r):i}function u(e){return function(n,t){e(null==n?t:null)}}function s(e){var n=e.responseType;return n&&"text"!==n?e.response:e.responseText}function i(e,n){return function(t,r){var u=o(t).mimeType(e).response(n);return r?u.get(r):u}}function a(e,n){return function(t,r,u){arguments.length<3&&(u=r,r=null);var s=o(t).mimeType(e);return s.row=function(e){return arguments.length?s.response(l(n,r=e)):r},s.row(r),u?s.get(u):s}}function l(e,n){return function(t){return e(t.responseText,n)}}var c=i("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),p=i("application/json",function(e){return JSON.parse(e.responseText)}),f=i("text/plain",function(e){return e.responseText}),d=i("application/xml",function(e){var n=e.responseXML;if(!n)throw new Error("parse error");return n}),m=a("text/csv",r.csvParse),g=a("text/tab-separated-values",r.tsvParse),h="0.4.1";e.version=h,e.request=o,e.html=c,e.json=p,e.text=f,e.xml=d,e.csv=m,e.tsv=g});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-collection"),require("d3-dispatch"),require("d3-dsv")):"function"==typeof define&&define.amd?define(["exports","d3-collection","d3-dispatch","d3-dsv"],n):n(e.d3_request={},e.d3_collection,e.d3_dispatch,e.d3_dsv)}(this,function(e,n,t,r){"use strict";function o(e,r){function o(e){var n,t=d.status;if(!t&&s(d)||t>=200&&300>t||304===t){if(l)try{n=l.call(i,d)}catch(r){return void p.call("error",i,r)}else n=d;p.call("load",i,n)}else p.call("error",i,e)}var i,a,l,c,p=t.dispatch("beforesend","progress","load","error"),f=n.map(),d=new XMLHttpRequest,m=0;return"undefined"==typeof XDomainRequest||"withCredentials"in d||!/^(http(s)?:)?\/\//.test(e)||(d=new XDomainRequest),"onload"in d?d.onload=d.onerror=d.ontimeout=o:d.onreadystatechange=function(e){d.readyState>3&&o(e)},d.onprogress=function(e){p.call("progress",i,e)},i={header:function(e,n){return e=(e+"").toLowerCase(),arguments.length<2?f.get(e):(null==n?f.remove(e):f.set(e,n+""),i)},mimeType:function(e){return arguments.length?(a=null==e?null:e+"",i):a},responseType:function(e){return arguments.length?(c=e,i):c},timeout:function(e){return arguments.length?(m=+e,i):m},response:function(e){return l=e,i},get:function(e,n){return i.send("GET",e,n)},post:function(e,n){return i.send("POST",e,n)},send:function(n,t,r){return r||"function"!=typeof t||(r=t,t=null),r&&1===r.length&&(r=u(r)),d.open(n,e,!0),null==a||f.has("accept")||f.set("accept",a+",*/*"),d.setRequestHeader&&f.each(function(e,n){d.setRequestHeader(n,e)}),null!=a&&d.overrideMimeType&&d.overrideMimeType(a),null!=c&&(d.responseType=c),m>0&&(d.timeout=m),r&&i.on("error",r).on("load",function(e){r(null,e)}),p.call("beforesend",i,d),d.send(null==t?null:t),i},abort:function(){return d.abort(),i},on:function(){var e=p.on.apply(p,arguments);return e===p?i:e}},r?i.get(r):i}function u(e){return function(n,t){e(null==n?t:null)}}function s(e){var n=e.responseType;return n&&"text"!==n?e.response:e.responseText}function i(e,n){return function(t,r){var u=o(t).mimeType(e).response(n);return r?u.get(r):u}}function a(e,n){return function(t,r,u){arguments.length<3&&(u=r,r=null);var s=o(t).mimeType(e);return s.row=function(e){return arguments.length?s.response(l(n,r=e)):r},s.row(r),u?s.get(u):s}}function l(e,n){return function(t){return e(t.responseText,n)}}var c=i("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),p=i("application/json",function(e){return JSON.parse(e.responseText)}),f=i("text/plain",function(e){return e.responseText}),d=i("application/xml",function(e){var n=e.responseXML;if(!n)throw new Error("parse error");return n}),m=a("text/csv",r.csvParse),g=a("text/tab-separated-values",r.tsvParse),h="0.4.2";e.version=h,e.request=o,e.html=c,e.json=p,e.text=f,e.xml=d,e.csv=m,e.tsv=g});
{
"name": "d3-request",
"version": "0.4.1",
"version": "0.4.2",
"description": "A convenient alternative to XMLHttpRequest.",

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

"d3-collection": "~0.1.1",
"d3-dispatch": "~0.3.0",
"d3-dispatch": "~0.4.0",
"d3-dsv": "~0.2.0"

@@ -34,0 +34,0 @@ },

@@ -37,3 +37,3 @@ # d3-request

<script src="https://d3js.org/d3-collection.v0.1.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v0.3.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v0.4.min.js"></script>
<script src="https://d3js.org/d3-dsv.v0.2.min.js"></script>

@@ -40,0 +40,0 @@ <script src="https://d3js.org/d3-request.v0.4.min.js"></script>

@@ -32,3 +32,3 @@ import {map} from "d3-collection";

} catch (e) {
event.error.call(request, e);
event.call("error", request, e);
return;

@@ -39,5 +39,5 @@ }

}
event.load.call(request, result);
event.call("load", request, result);
} else {
event.error.call(request, o);
event.call("error", request, o);
}

@@ -47,3 +47,3 @@ }

xhr.onprogress = function(e) {
event.progress.call(request, e);
event.call("progress", request, e);
};

@@ -109,3 +109,3 @@

if (callback) request.on("error", callback).on("load", function(xhr) { callback(null, xhr); });
event.beforesend.call(request, xhr);
event.call("beforesend", request, xhr);
xhr.send(data == null ? null : data);

@@ -112,0 +112,0 @@ return request;

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