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 1.0.5 to 1.0.6

rollup.config.js

2

build/d3-request.js

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

// https://d3js.org/d3-request/ Version 1.0.5. Copyright 2017 Mike Bostock.
// https://d3js.org/d3-request/ Version 1.0.6. Copyright 2017 Mike Bostock.
(function (global, factory) {

@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-collection'), require('d3-dispatch'), require('d3-dsv')) :

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

// https://d3js.org/d3-request/ Version 1.0.5. Copyright 2017 Mike Bostock.
// https://d3js.org/d3-request/ Version 1.0.6. Copyright 2017 Mike Bostock.
!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=e.d3||{},e.d3,e.d3,e.d3)}(this,function(e,n,t,r){"use strict";function o(e){return function(n,t){e(null==n?t:null)}}function u(e){var n=e.responseType;return n&&"text"!==n?e.response:e.responseText}function l(e,n){return function(t){return e(t.responseText,n)}}var i=function(e,r){function l(e){var n,t=d.status;if(!t&&u(d)||t>=200&&t<300||304===t){if(c)try{n=c.call(i,d)}catch(e){return void f.call("error",i,e)}else n=d;f.call("load",i,n)}else f.call("error",i,e)}var i,s,c,a,f=t.dispatch("beforesend","progress","load","error"),p=n.map(),d=new XMLHttpRequest,h=null,m=null,v=0;if("undefined"==typeof XDomainRequest||"withCredentials"in d||!/^(http(s)?:)?\/\//.test(e)||(d=new XDomainRequest),"onload"in d?d.onload=d.onerror=d.ontimeout=l:d.onreadystatechange=function(e){d.readyState>3&&l(e)},d.onprogress=function(e){f.call("progress",i,e)},i={header:function(e,n){return e=(e+"").toLowerCase(),arguments.length<2?p.get(e):(null==n?p.remove(e):p.set(e,n+""),i)},mimeType:function(e){return arguments.length?(s=null==e?null:e+"",i):s},responseType:function(e){return arguments.length?(a=e,i):a},timeout:function(e){return arguments.length?(v=+e,i):v},user:function(e){return arguments.length<1?h:(h=null==e?null:e+"",i)},password:function(e){return arguments.length<1?m:(m=null==e?null:e+"",i)},response:function(e){return c=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 d.open(n,e,!0,h,m),null==s||p.has("accept")||p.set("accept",s+",*/*"),d.setRequestHeader&&p.each(function(e,n){d.setRequestHeader(n,e)}),null!=s&&d.overrideMimeType&&d.overrideMimeType(s),null!=a&&(d.responseType=a),v>0&&(d.timeout=v),null==r&&"function"==typeof t&&(r=t,t=null),null!=r&&1===r.length&&(r=o(r)),null!=r&&i.on("error",r).on("load",function(e){r(null,e)}),f.call("beforesend",i,d),d.send(null==t?null:t),i},abort:function(){return d.abort(),i},on:function(){var e=f.on.apply(f,arguments);return e===f?i:e}},null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i},s=function(e,n){return function(t,r){var o=i(t).mimeType(e).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return o.get(r)}return o}},c=s("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),a=s("application/json",function(e){return JSON.parse(e.responseText)}),f=s("text/plain",function(e){return e.responseText}),p=s("application/xml",function(e){var n=e.responseXML;if(!n)throw new Error("parse error");return n}),d=function(e,n){return function(t,r,o){arguments.length<3&&(o=r,r=null);var u=i(t).mimeType(e);return u.row=function(e){return arguments.length?u.response(l(n,r=e)):r},u.row(r),o?u.get(o):u}},h=d("text/csv",r.csvParse),m=d("text/tab-separated-values",r.tsvParse);e.request=i,e.html=c,e.json=a,e.text=f,e.xml=p,e.csv=h,e.tsv=m,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "d3-request",
"version": "1.0.5",
"version": "1.0.6",
"description": "A convenient alternative to XMLHttpRequest.",

@@ -19,3 +19,4 @@ "keywords": [

"main": "build/d3-request.node.js",
"browser": "build/d3-request.js",
"unpkg": "build/d3-request.js",
"jsdelivr": "build/d3-request.js",
"module": "index",

@@ -28,5 +29,5 @@ "jsnext:main": "index.js",

"scripts": {
"pretest": "rm -rf build && mkdir build && bin/rollup-node && rollup --banner \"$(preamble)\" -f umd -g d3-collection:d3,d3-dispatch:d3,d3-dsv:d3 -n d3 -o build/d3-request.js -- index.js",
"pretest": "rm -rf build && mkdir build && bin/rollup-node && rollup -c --banner \"$(preamble)\"",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-request.js -c -m -o build/d3-request.min.js",
"prepublishOnly": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-request.js -c -m -o build/d3-request.min.js",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-request/build/d3-request.js d3-request.v1.js && cp ../d3-request/build/d3-request.min.js d3-request.v1.min.js && git add d3-request.v1.js d3-request.v1.min.js && git commit -m \"d3-request ${npm_package_version}\" && git push && cd - && zip -j build/d3-request.zip -- LICENSE README.md build/d3-request.js build/d3-request.min.js"

@@ -41,8 +42,8 @@ },

"devDependencies": {
"eslint": "3",
"package-preamble": "0.0",
"rollup": "0.41",
"eslint": "4",
"package-preamble": "0.1",
"rollup": "0.49",
"tape": "4",
"uglify-js": "^2.8.11"
"uglify-js": "3"
}
}

Sorry, the diff of this file is not supported yet

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