d3-request
Advanced tools
Comparing version 0.4.6 to 0.4.7
@@ -7,3 +7,3 @@ (function (global, factory) { | ||
var version = "0.4.6"; | ||
var version = "0.4.7"; | ||
@@ -10,0 +10,0 @@ function request(url, callback) { |
@@ -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_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(c)try{n=c.call(l,d)}catch(r){return void p.call("error",l,r)}else n=d;p.call("load",l,n)}else p.call("error",l,e)}var l,i,c,a,p=t.dispatch("beforesend","progress","load","error"),f=n.map(),d=new XMLHttpRequest,h=null,m=null,v=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",l,e)},l={header:function(e,n){return e=(e+"").toLowerCase(),arguments.length<2?f.get(e):(null==n?f.remove(e):f.set(e,n+""),l)},mimeType:function(e){return arguments.length?(i=null==e?null:e+"",l):i},responseType:function(e){return arguments.length?(a=e,l):a},timeout:function(e){return arguments.length?(v=+e,l):v},user:function(e){return arguments.length<1?h:(h=null==e?null:e+"",l)},password:function(e){return arguments.length<1?m:(m=null==e?null:e+"",l)},response:function(e){return c=e,l},get:function(e,n){return l.send("GET",e,n)},post:function(e,n){return l.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,h,m),null==i||f.has("accept")||f.set("accept",i+",*/*"),d.setRequestHeader&&f.each(function(e,n){d.setRequestHeader(n,e)}),null!=i&&d.overrideMimeType&&d.overrideMimeType(i),null!=a&&(d.responseType=a),v>0&&(d.timeout=v),r&&l.on("error",r).on("load",function(e){r(null,e)}),p.call("beforesend",l,d),d.send(null==t?null:t),l},abort:function(){return d.abort(),l},on:function(){var e=p.on.apply(p,arguments);return e===p?l:e}},r?l.get(r):l}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 l(e,n){return function(t,r){var u=o(t).mimeType(e).response(n);return r?u.get(r):u}}function i(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(c(n,r=e)):r},s.row(r),u?s.get(u):s}}function c(e,n){return function(t){return e(t.responseText,n)}}var a="0.4.6",p=l("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),f=l("application/json",function(e){return JSON.parse(e.responseText)}),d=l("text/plain",function(e){return e.responseText}),h=l("application/xml",function(e){var n=e.responseXML;if(!n)throw new Error("parse error");return n}),m=i("text/csv",r.csvParse),v=i("text/tab-separated-values",r.tsvParse);e.version=a,e.request=o,e.html=p,e.json=f,e.text=d,e.xml=h,e.csv=m,e.tsv=v}); | ||
!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_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(c)try{n=c.call(l,d)}catch(r){return void p.call("error",l,r)}else n=d;p.call("load",l,n)}else p.call("error",l,e)}var l,i,c,a,p=t.dispatch("beforesend","progress","load","error"),f=n.map(),d=new XMLHttpRequest,h=null,m=null,v=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",l,e)},l={header:function(e,n){return e=(e+"").toLowerCase(),arguments.length<2?f.get(e):(null==n?f.remove(e):f.set(e,n+""),l)},mimeType:function(e){return arguments.length?(i=null==e?null:e+"",l):i},responseType:function(e){return arguments.length?(a=e,l):a},timeout:function(e){return arguments.length?(v=+e,l):v},user:function(e){return arguments.length<1?h:(h=null==e?null:e+"",l)},password:function(e){return arguments.length<1?m:(m=null==e?null:e+"",l)},response:function(e){return c=e,l},get:function(e,n){return l.send("GET",e,n)},post:function(e,n){return l.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,h,m),null==i||f.has("accept")||f.set("accept",i+",*/*"),d.setRequestHeader&&f.each(function(e,n){d.setRequestHeader(n,e)}),null!=i&&d.overrideMimeType&&d.overrideMimeType(i),null!=a&&(d.responseType=a),v>0&&(d.timeout=v),r&&l.on("error",r).on("load",function(e){r(null,e)}),p.call("beforesend",l,d),d.send(null==t?null:t),l},abort:function(){return d.abort(),l},on:function(){var e=p.on.apply(p,arguments);return e===p?l:e}},r?l.get(r):l}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 l(e,n){return function(t,r){var u=o(t).mimeType(e).response(n);return r?u.get(r):u}}function i(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(c(n,r=e)):r},s.row(r),u?s.get(u):s}}function c(e,n){return function(t){return e(t.responseText,n)}}var a="0.4.7",p=l("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),f=l("application/json",function(e){return JSON.parse(e.responseText)}),d=l("text/plain",function(e){return e.responseText}),h=l("application/xml",function(e){var n=e.responseXML;if(!n)throw new Error("parse error");return n}),m=i("text/csv",r.csvParse),v=i("text/tab-separated-values",r.tsvParse);e.version=a,e.request=o,e.html=p,e.json=f,e.text=d,e.xml=h,e.csv=m,e.tsv=v}); |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var version = "0.4.6"; | ||
var version = "0.4.7"; | ||
@@ -12,0 +12,0 @@ function request(url, callback) { |
export var name = "d3-request"; | ||
export var version = "0.4.6"; | ||
export var version = "0.4.7"; | ||
export var description = "A convenient alternative to XMLHttpRequest."; | ||
@@ -12,3 +12,3 @@ export var keywords = ["d3","request","ajax","XMLHttpRequest"]; | ||
export var scripts = {"pretest":"rm -rf build && mkdir build && json2module package.json > build/package.js && bin/rollup-node && rollup -f umd -g d3-collection:d3_collection,d3-dispatch:d3_dispatch,d3-dsv:d3_dsv -n d3_request -o build/d3-request.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src","prepublish":"npm run test && uglifyjs build/d3-request.js -c -m -o build/d3-request.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-request.js ../d3.github.com/d3-request.v0.4.js && cp build/d3-request.min.js ../d3.github.com/d3-request.v0.4.min.js && cd ../d3.github.com && git add d3-request.v0.4.js d3-request.v0.4.min.js && git commit -m \"d3-request ${VERSION}\" && git push && cd - && zip -j build/d3-request.zip -- LICENSE README.md build/d3-request.js build/d3-request.min.js"}; | ||
export var dependencies = {"d3-collection":"~0.1.1","d3-dispatch":"~0.4.0","d3-dsv":"~0.3.0","xmlhttprequest":"1"}; | ||
export var devDependencies = {"json2module":"0.0","rollup":"0.26","tape":"4","uglify-js":"2"}; | ||
export var dependencies = {"d3-collection":"~0.2.0","d3-dispatch":"~0.4.0","d3-dsv":"~0.3.0","xmlhttprequest":"1"}; | ||
export var devDependencies = {"eslint":"2","json2module":"0.0","rollup":"0.26","tape":"4","uglify-js":"2"}; |
{ | ||
"name": "d3-request", | ||
"version": "0.4.6", | ||
"version": "0.4.7", | ||
"description": "A convenient alternative to XMLHttpRequest.", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"dependencies": { | ||
"d3-collection": "~0.1.1", | ||
"d3-collection": "~0.2.0", | ||
"d3-dispatch": "~0.4.0", | ||
@@ -38,2 +38,3 @@ "d3-dsv": "~0.3.0", | ||
"devDependencies": { | ||
"eslint": "2", | ||
"json2module": "0.0", | ||
@@ -40,0 +41,0 @@ "rollup": "0.26", |
@@ -34,6 +34,6 @@ # d3-request | ||
If you use NPM, `npm install d3-request`. Otherwise, download the [latest release](https://github.com/d3/d3-request/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-request.v0.4.min.js) or as part of [D3 4.0 alpha](https://github.com/mbostock/d3/tree/4). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_request` global is exported: | ||
If you use NPM, `npm install d3-request`. Otherwise, download the [latest release](https://github.com/d3/d3-request/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-request.v0.4.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_request` global is exported: | ||
```html | ||
<script src="https://d3js.org/d3-collection.v0.1.min.js"></script> | ||
<script src="https://d3js.org/d3-collection.v0.2.min.js"></script> | ||
<script src="https://d3js.org/d3-dispatch.v0.4.min.js"></script> | ||
@@ -40,0 +40,0 @@ <script src="https://d3js.org/d3-dsv.v0.3.min.js"></script> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41452
5
+ Addedd3-collection@0.2.0(transitive)
- Removedd3-collection@0.1.2(transitive)
Updatedd3-collection@~0.2.0