Socket
Socket
Sign inDemoInstall

d3-selection

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-selection - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

.eslintrc.json

8

dist/d3-selection.js

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

// https://d3js.org/d3-selection/ Version 1.3.0. Copyright 2018 Mike Bostock.
// https://d3js.org/d3-selection/ v1.3.1 Copyright 2018 Mike Bostock
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.d3 = global.d3 || {})));
}(this, (function (exports) { 'use strict';

@@ -7,0 +7,0 @@

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

// https://d3js.org/d3-selection/ Version 1.3.0. Copyright 2018 Mike Bostock.
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),H.hasOwnProperty(n)?{space:H[n],local:t}:t}function e(t){var e=n(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===z&&n.documentElement.namespaceURI===z?n.createElement(t):n.createElementNS(e,t)}})(e)}function r(){}function i(t){return null==t?r:function(){return this.querySelector(t)}}function o(){return[]}function u(t){return null==t?o:function(){return this.querySelectorAll(t)}}function c(t){return new Array(t.length)}function s(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function a(t,n,e,r,i,o){for(var u,c=0,a=n.length,l=o.length;c<l;++c)(u=n[c])?(u.__data__=o[c],r[c]=u):e[c]=new s(t,o[c]);for(;c<a;++c)(u=n[c])&&(i[c]=u)}function l(t,n,e,r,i,o,u){var c,a,l,f={},h=n.length,p=o.length,_=new Array(h);for(c=0;c<h;++c)(a=n[c])&&(_[c]=l=X+u.call(a,a.__data__,c,n),l in f?i[c]=a:f[l]=a);for(c=0;c<p;++c)(a=f[l=X+u.call(t,o[c],c,o)])?(r[c]=a,a.__data__=o[c],f[l]=null):e[c]=new s(t,o[c]);for(c=0;c<h;++c)(a=n[c])&&f[_[c]]===a&&(i[c]=a)}function f(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function h(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function p(t,n){return t.style.getPropertyValue(n)||h(t).getComputedStyle(t,null).getPropertyValue(n)}function _(t){return t.trim().split(/^|\s+/)}function d(t){return t.classList||new v(t)}function v(t){this._node=t,this._names=_(t.getAttribute("class")||"")}function m(t,n){for(var e=d(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function y(t,n){for(var e=d(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function g(){this.textContent=""}function w(){this.innerHTML=""}function A(){this.nextSibling&&this.parentNode.appendChild(this)}function x(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function S(){return null}function b(){var t=this.parentNode;t&&t.removeChild(this)}function E(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function N(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function C(t,n,e){return t=P(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function P(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function M(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function L(t,n,e){var r=Y.hasOwnProperty(t.type)?C:P;return function(i,o,u){var c,s=this.__on,a=r(n,o,u);if(s)for(var l=0,f=s.length;l<f;++l)if((c=s[l]).type===t.type&&c.name===t.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=a,c.capture=e),void(c.value=n);this.addEventListener(t.type,a,e),c={type:t.type,name:t.name,value:n,listener:a,capture:e},s?s.push(c):this.__on=[c]}}function T(t,n,e){var r=h(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function B(t,n){this._groups=t,this._parents=n}function q(){return new B([[document.documentElement]],$)}function O(t){return"string"==typeof t?new B([[document.querySelector(t)]],[document.documentElement]):new B([[t]],$)}function D(){return new V}function V(){this._="@"+(++F).toString(36)}function R(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function j(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}var z="http://www.w3.org/1999/xhtml",H={svg:"http://www.w3.org/2000/svg",xhtml:z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},I=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var U=document.documentElement;if(!U.matches){var k=U.webkitMatchesSelector||U.msMatchesSelector||U.mozMatchesSelector||U.oMatchesSelector;I=function(t){return function(){return k.call(this,t)}}}}var G=I;s.prototype={constructor:s,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var X="$";v.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Y={};if(t.event=null,"undefined"!=typeof document){"onmouseenter"in document.documentElement||(Y={mouseenter:"mouseover",mouseleave:"mouseout"})}var $=[null];B.prototype=q.prototype={constructor:B,select:function(t){"function"!=typeof t&&(t=i(t));for(var n=this._groups,e=n.length,r=new Array(e),o=0;o<e;++o)for(var u,c,s=n[o],a=s.length,l=r[o]=new Array(a),f=0;f<a;++f)(u=s[f])&&(c=t.call(u,u.__data__,f,s))&&("__data__"in u&&(c.__data__=u.__data__),l[f]=c);return new B(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var c,s=n[o],a=s.length,l=0;l<a;++l)(c=s[l])&&(r.push(t.call(c,c.__data__,l,s)),i.push(c));return new B(r,i)},filter:function(t){"function"!=typeof t&&(t=G(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],c=u.length,s=r[i]=[],a=0;a<c;++a)(o=u[a])&&t.call(o,o.__data__,a,u)&&s.push(o);return new B(r,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),f=-1,this.each(function(t){d[++f]=t}),d;var e=n?l:a,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,u=new Array(o),c=new Array(o),s=new Array(o),f=0;f<o;++f){var h=r[f],p=i[f],_=p.length,d=t.call(h,h&&h.__data__,f,r),v=d.length,m=c[f]=new Array(v),y=u[f]=new Array(v);e(h,p,m,y,s[f]=new Array(_),d,n);for(var g,w,A=0,x=0;A<v;++A)if(g=m[A]){for(A>=x&&(x=A+1);!(w=y[x])&&++x<v;);g._next=w||null}}return u=new B(u,r),u._enter=c,u._exit=s,u},enter:function(){return new B(this._enter||this._groups.map(c),this._parents)},exit:function(){return new B(this._exit||this._groups.map(c),this._parents)},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),c=0;c<o;++c)for(var s,a=n[c],l=e[c],f=a.length,h=u[c]=new Array(f),p=0;p<f;++p)(s=a[p]||l[p])&&(h[p]=s);for(;c<r;++c)u[c]=n[c];return new B(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=f);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,c=e[o],s=c.length,a=i[o]=new Array(s),l=0;l<s;++l)(u=c[l])&&(a[l]=u);a.sort(n)}return new B(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,c=o.length;u<c;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,e){var r=n(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?r.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:r.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(r,e))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):p(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=_(t+"");if(arguments.length<2){for(var r=d(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?m:y)(this,t)}}:n?function(t){return function(){m(this,t)}}:function(t){return function(){y(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?g:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?w:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(A)},lower:function(){return this.each(x)},append:function(t){var n="function"==typeof t?t:e(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var r="function"==typeof t?t:e(t),o=null==n?S:"function"==typeof n?n:i(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})},remove:function(){return this.each(b)},clone:function(t){return this.select(t?N:E)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),u=o.length;if(!(arguments.length<2)){for(c=n?L:M,null==e&&(e=!1),r=0;r<u;++r)this.each(c(o[r],n,e));return this}var c=this.node().__on;if(c)for(var s,a=0,l=c.length;a<l;++a)for(r=0,s=c[a];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return T(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return T(this,t,n)}})(t,n))}};var F=0;V.prototype=D.prototype={constructor:V,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},t.create=function(t){return O(e(t).call(document.documentElement))},t.creator=e,t.local=D,t.matcher=G,t.mouse=function(t){var n=R();return n.changedTouches&&(n=n.changedTouches[0]),j(t,n)},t.namespace=n,t.namespaces=H,t.clientPoint=j,t.select=O,t.selectAll=function(t){return"string"==typeof t?new B([document.querySelectorAll(t)],[document.documentElement]):new B([null==t?[]:t],$)},t.selection=q,t.selector=i,t.selectorAll=u,t.style=p,t.touch=function(t,n,e){arguments.length<3&&(e=n,n=R().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return j(t,r);return null},t.touches=function(t,n){null==n&&(n=R().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=j(t,n[e]);return i},t.window=h,t.customEvent=function(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}},Object.defineProperty(t,"__esModule",{value:!0})});
// https://d3js.org/d3-selection/ v1.3.1 Copyright 2018 Mike Bostock
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(t){var e=r(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}})(e)}function o(){}function u(t){return null==t?o:function(){return this.querySelector(t)}}function c(){return[]}function s(t){return null==t?c:function(){return this.querySelectorAll(t)}}var a=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var l=document.documentElement;if(!l.matches){var f=l.webkitMatchesSelector||l.msMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector;a=function(t){return function(){return f.call(this,t)}}}}var h=a;function p(t){return new Array(t.length)}function _(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}_.prototype={constructor:_,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d="$";function v(t,n,e,r,i,o){for(var u,c=0,s=n.length,a=o.length;c<a;++c)(u=n[c])?(u.__data__=o[c],r[c]=u):e[c]=new _(t,o[c]);for(;c<s;++c)(u=n[c])&&(i[c]=u)}function m(t,n,e,r,i,o,u){var c,s,a,l={},f=n.length,h=o.length,p=new Array(f);for(c=0;c<f;++c)(s=n[c])&&(p[c]=a=d+u.call(s,s.__data__,c,n),a in l?i[c]=s:l[a]=s);for(c=0;c<h;++c)(s=l[a=d+u.call(t,o[c],c,o)])?(r[c]=s,s.__data__=o[c],l[a]=null):e[c]=new _(t,o[c]);for(c=0;c<f;++c)(s=n[c])&&l[p[c]]===s&&(i[c]=s)}function y(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function g(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function w(t,n){return t.style.getPropertyValue(n)||g(t).getComputedStyle(t,null).getPropertyValue(n)}function A(t){return t.trim().split(/^|\s+/)}function x(t){return t.classList||new S(t)}function S(t){this._node=t,this._names=A(t.getAttribute("class")||"")}function b(t,n){for(var e=x(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function E(t,n){for(var e=x(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function N(){this.textContent=""}function C(){this.innerHTML=""}function P(){this.nextSibling&&this.parentNode.appendChild(this)}function M(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function L(){return null}function T(){var t=this.parentNode;t&&t.removeChild(this)}function B(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function q(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}S.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var O={};(t.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(O={mouseenter:"mouseover",mouseleave:"mouseout"}));function D(t,n,e){return t=V(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function V(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function R(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function j(t,n,e){var r=O.hasOwnProperty(t.type)?D:V;return function(i,o,u){var c,s=this.__on,a=r(n,o,u);if(s)for(var l=0,f=s.length;l<f;++l)if((c=s[l]).type===t.type&&c.name===t.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=a,c.capture=e),void(c.value=n);this.addEventListener(t.type,a,e),c={type:t.type,name:t.name,value:n,listener:a,capture:e},s?s.push(c):this.__on=[c]}}function z(t,n,e){var r=g(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}var H=[null];function I(t,n){this._groups=t,this._parents=n}function U(){return new I([[document.documentElement]],H)}function k(t){return"string"==typeof t?new I([[document.querySelector(t)]],[document.documentElement]):new I([[t]],H)}I.prototype=U.prototype={constructor:I,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,c,s=n[i],a=s.length,l=r[i]=new Array(a),f=0;f<a;++f)(o=s[f])&&(c=t.call(o,o.__data__,f,s))&&("__data__"in o&&(c.__data__=o.__data__),l[f]=c);return new I(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,c=n[o],a=c.length,l=0;l<a;++l)(u=c[l])&&(r.push(t.call(u,u.__data__,l,c)),i.push(u));return new I(r,i)},filter:function(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],c=u.length,s=r[i]=[],a=0;a<c;++a)(o=u[a])&&t.call(o,o.__data__,a,u)&&s.push(o);return new I(r,this._parents)},data:function(t,n){if(!t)return _=new Array(this.size()),l=-1,this.each(function(t){_[++l]=t}),_;var e,r=n?m:v,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,c=new Array(u),s=new Array(u),a=new Array(u),l=0;l<u;++l){var f=i[l],h=o[l],p=h.length,_=t.call(f,f&&f.__data__,l,i),d=_.length,y=s[l]=new Array(d),g=c[l]=new Array(d);r(f,h,y,g,a[l]=new Array(p),_,n);for(var w,A,x=0,S=0;x<d;++x)if(w=y[x]){for(x>=S&&(S=x+1);!(A=g[S])&&++S<d;);w._next=A||null}}return(c=new I(c,i))._enter=s,c._exit=a,c},enter:function(){return new I(this._enter||this._groups.map(p),this._parents)},exit:function(){return new I(this._exit||this._groups.map(p),this._parents)},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),c=0;c<o;++c)for(var s,a=n[c],l=e[c],f=a.length,h=u[c]=new Array(f),p=0;p<f;++p)(s=a[p]||l[p])&&(h[p]=s);for(;c<r;++c)u[c]=n[c];return new I(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=y);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,c=e[o],s=c.length,a=i[o]=new Array(s),l=0;l<s;++l)(u=c[l])&&(a[l]=u);a.sort(n)}return new I(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,c=o.length;u<c;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=r(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):w(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=A(t+"");if(arguments.length<2){for(var r=x(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?b:E)(this,t)}}:n?function(t){return function(){b(this,t)}}:function(t){return function(){E(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?N:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?C:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(P)},lower:function(){return this.each(M)},append:function(t){var n="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:i(t),r=null==n?L:"function"==typeof n?n:u(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(T)},clone:function(t){return this.select(t?q:B)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),u=o.length;if(!(arguments.length<2)){for(c=n?j:R,null==e&&(e=!1),r=0;r<u;++r)this.each(c(o[r],n,e));return this}var c=this.node().__on;if(c)for(var s,a=0,l=c.length;a<l;++a)for(r=0,s=c[a];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return z(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return z(this,t,n)}})(t,n))}};var G=0;function X(){return new Y}function Y(){this._="@"+(++G).toString(36)}function $(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function F(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}Y.prototype=X.prototype={constructor:Y,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},t.create=function(t){return k(i(t).call(document.documentElement))},t.creator=i,t.local=X,t.matcher=h,t.mouse=function(t){var n=$();return n.changedTouches&&(n=n.changedTouches[0]),F(t,n)},t.namespace=r,t.namespaces=e,t.clientPoint=F,t.select=k,t.selectAll=function(t){return"string"==typeof t?new I([document.querySelectorAll(t)],[document.documentElement]):new I([null==t?[]:t],H)},t.selection=U,t.selector=u,t.selectorAll=s,t.style=w,t.touch=function(t,n,e){arguments.length<3&&(e=n,n=$().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return F(t,r);return null},t.touches=function(t,n){null==n&&(n=$().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=F(t,n[e]);return i},t.window=g,t.customEvent=function(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}},Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-selection",
"version": "1.3.0",
"version": "1.3.1",
"description": "Data-driven DOM manipulation: select elements and join them to data.",

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

},
"main": "dist/d3-selection.js",
"main": "dist/d3-selection.min.js",
"module": "index",

@@ -27,15 +27,14 @@ "jsnext:main": "index",

"scripts": {
"pretest": "rm -rf dist && mkdir dist && rollup -c --banner \"$(preamble)\"",
"pretest": "rollup -c",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublishOnly": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" dist/d3-selection.js -c -m -o dist/d3-selection.min.js",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-selection/dist/d3-selection.js d3-selection.v1.js && cp ../d3-selection/dist/d3-selection.min.js d3-selection.v1.min.js && git add d3-selection.v1.js d3-selection.v1.min.js && git commit -m \"d3-selection ${npm_package_version}\" && git push && cd - && zip -j dist/d3-selection.zip -- LICENSE README.md dist/d3-selection.js dist/d3-selection.min.js"
"prepublishOnly": "rm -rf dist && yarn test",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v1.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v1.min.js && git add ${npm_package_name}.v1.js ${npm_package_name}.v1.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js"
},
"devDependencies": {
"eslint": "4",
"jsdom": "11",
"package-preamble": "0.1",
"rollup": "0.52",
"tape": "4",
"uglify-js": "3.2"
"eslint": "5",
"jsdom": "12",
"rollup": "0.64",
"rollup-plugin-terser": "1",
"tape": "4"
}
}

@@ -391,3 +391,3 @@ # d3-selection

Inserts clones the selected elements immediately following the selected elements. Equivalent to:
Inserts clones of the selected elements immediately following the selected elements and returns a selection of the newly added clones. If *deep* is truthy, the descendant nodes of the selected elements will be cloned as well. Otherwise, only the elements themselves will be cloned. Equivalent to:

@@ -394,0 +394,0 @@ ```js

@@ -1,14 +0,36 @@

const definition = require("./package.json");
const dependencies = Object.keys(definition.dependencies || {});
import {terser} from "rollup-plugin-terser";
import * as meta from "./package.json";
export default {
input: "index",
external: dependencies,
const config = {
input: "index.js",
external: Object.keys(meta.dependencies || {}),
output: {
file: `dist/${meta.name}.js`,
name: "d3",
format: "umd",
indent: false,
extend: true,
file: `dist/${definition.name}.js`,
format: "umd",
globals: dependencies.reduce((p, v) => (p[v] = "d3", p), {}),
name: "d3"
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`,
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).map(key => ({[key]: "d3"})))
},
plugins: []
};
export default [
config,
{
...config,
output: {
...config.output,
file: `dist/${meta.name}.min.js`
},
plugins: [
...config.plugins,
terser({
output: {
preamble: config.output.banner
}
})
]
}
};
];
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