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

d3-array

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-array - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

build/d3-array.js

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

// https://d3js.org/d3-array/ Version 1.1.0. Copyright 2017 Mike Bostock.
// https://d3js.org/d3-array/ Version 1.1.1. Copyright 2017 Mike Bostock.
(function (global, factory) {

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

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

// https://d3js.org/d3-array/ Version 1.1.0. Copyright 2017 Mike Bostock.
// https://d3js.org/d3-array/ Version 1.1.1. Copyright 2017 Mike Bostock.
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(n.d3=n.d3||{})}(this,function(n){"use strict";function r(n){return function(r,t){return o(n(r),t)}}function t(n,r){return[n,r]}function e(n,r,t){var e=Math.abs(r-n)/Math.max(0,t),u=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),o=e/u;return o>=w?u*=10:o>=x?u*=5:o>=k&&(u*=2),r<n?-u:u}function u(n){return n.length}var o=function(n,r){return n<r?-1:n>r?1:n>=r?0:NaN},f=function(n){return 1===n.length&&(n=r(n)),{left:function(r,t,e,u){for(null==e&&(e=0),null==u&&(u=r.length);e<u;){var o=e+u>>>1;n(r[o],t)<0?e=o+1:u=o}return e},right:function(r,t,e,u){for(null==e&&(e=0),null==u&&(u=r.length);e<u;){var o=e+u>>>1;n(r[o],t)>0?u=o:e=o+1}return e}}},l=f(o),i=l.right,a=l.left,h=function(n,r){null==r&&(r=t);for(var e=0,u=n.length-1,o=n[0],f=new Array(u<0?0:u);e<u;)f[e]=r(o,o=n[++e]);return f},c=function(n,r,e){var u,o,f,l,i=n.length,a=r.length,h=new Array(i*a);for(null==e&&(e=t),u=f=0;u<i;++u)for(l=n[u],o=0;o<a;++o,++f)h[f]=e(l,r[o]);return h},s=function(n,r){return r<n?-1:r>n?1:r>=n?0:NaN},g=function(n){return null===n?NaN:+n},v=function(n,r){var t,e,u=n.length,o=0,f=0,l=-1,i=0;if(null==r)for(;++l<u;)isNaN(t=g(n[l]))||(e=t-o,o+=e/++i,f+=e*(t-o));else for(;++l<u;)isNaN(t=g(r(n[l],l,n)))||(e=t-o,o+=e/++i,f+=e*(t-o));if(i>1)return f/(i-1)},p=function(n,r){var t=v(n,r);return t?Math.sqrt(t):t},d=function(n,r){var t,e,u,o=-1,f=n.length;if(null==r){for(;++o<f;)if(null!=(e=n[o])&&e>=e){t=u=e;break}for(;++o<f;)null!=(e=n[o])&&(t>e&&(t=e),u<e&&(u=e))}else{for(;++o<f;)if(null!=(e=r(n[o],o,n))&&e>=e){t=u=e;break}for(;++o<f;)null!=(e=r(n[o],o,n))&&(t>e&&(t=e),u<e&&(u=e))}return[t,u]},M=Array.prototype,y=M.slice,N=M.map,m=function(n){return function(){return n}},A=function(n){return n},b=function(n,r,t){n=+n,r=+r,t=(u=arguments.length)<2?(r=n,n=0,1):u<3?1:+t;for(var e=-1,u=0|Math.max(0,Math.ceil((r-n)/t)),o=new Array(u);++e<u;)o[e]=n+e*t;return o},w=Math.sqrt(50),x=Math.sqrt(10),k=Math.sqrt(2),q=function(n,r,t){var u=e(n,r,t);return b(Math.ceil(n/u)*u,Math.floor(r/u)*u+u/2,u)},L=function(n){return Math.ceil(Math.log(n.length)/Math.LN2)+1},S=function(){function n(n){var u,o,f=n.length,l=new Array(f);for(u=0;u<f;++u)l[u]=r(n[u],u,n);var a=t(l),h=a[0],c=a[1],s=e(l,h,c);Array.isArray(s)||(s=q(h,c,s));for(var g=s.length;s[0]<=h;)s.shift(),--g;for(;s[g-1]>=c;)s.pop(),--g;var v,p=new Array(g+1);for(u=0;u<=g;++u)v=p[u]=[],v.x0=u>0?s[u-1]:h,v.x1=u<g?s[u]:c;for(u=0;u<f;++u)o=l[u],h<=o&&o<=c&&p[i(s,o,0,g)].push(n[u]);return p}var r=A,t=d,e=L;return n.value=function(t){return arguments.length?(r="function"==typeof t?t:m(t),n):r},n.domain=function(r){return arguments.length?(t="function"==typeof r?r:m([r[0],r[1]]),n):t},n.thresholds=function(r){return arguments.length?(e="function"==typeof r?r:m(Array.isArray(r)?y.call(r):r),n):e},n},j=function(n,r,t){if(null==t&&(t=g),e=n.length){if((r=+r)<=0||e<2)return+t(n[0],0,n);if(r>=1)return+t(n[e-1],e-1,n);var e,u=(e-1)*r,o=Math.floor(u),f=+t(n[o],o,n);return f+(+t(n[o+1],o+1,n)-f)*(u-o)}},_=function(n,r,t){return n=N.call(n,g).sort(o),Math.ceil((t-r)/(2*(j(n,.75)-j(n,.25))*Math.pow(n.length,-1/3)))},z=function(n,r,t){return Math.ceil((t-r)/(3.5*p(n)*Math.pow(n.length,-1/3)))},D=function(n,r){var t,e,u=-1,o=n.length;if(null==r){for(;++u<o;)if(null!=(e=n[u])&&e>=e){t=e;break}for(;++u<o;)null!=(e=n[u])&&e>t&&(t=e)}else{for(;++u<o;)if(null!=(e=r(n[u],u,n))&&e>=e){t=e;break}for(;++u<o;)null!=(e=r(n[u],u,n))&&e>t&&(t=e)}return t},F=function(n,r){var t,e=0,u=n.length,o=-1,f=u;if(null==r)for(;++o<u;)isNaN(t=g(n[o]))?--f:e+=t;else for(;++o<u;)isNaN(t=g(r(n[o],o,n)))?--f:e+=t;if(f)return e/f},O=function(n,r){var t,e=[],u=n.length,f=-1;if(null==r)for(;++f<u;)isNaN(t=g(n[f]))||e.push(t);else for(;++f<u;)isNaN(t=g(r(n[f],f,n)))||e.push(t);return j(e.sort(o),.5)},P=function(n){for(var r,t,e,u=n.length,o=-1,f=0;++o<u;)f+=n[o].length;for(t=new Array(f);--u>=0;)for(e=n[u],r=e.length;--r>=0;)t[--f]=e[r];return t},R=function(n,r){var t,e,u=-1,o=n.length;if(null==r){for(;++u<o;)if(null!=(e=n[u])&&e>=e){t=e;break}for(;++u<o;)null!=(e=n[u])&&t>e&&(t=e)}else{for(;++u<o;)if(null!=(e=r(n[u],u,n))&&e>=e){t=e;break}for(;++u<o;)null!=(e=r(n[u],u,n))&&t>e&&(t=e)}return t},B=function(n,r){for(var t=r.length,e=new Array(t);t--;)e[t]=n[r[t]];return e},C=function(n,r){if(t=n.length){var t,e,u=0,f=0,l=n[f];for(r||(r=o);++u<t;)(r(e=n[u],l)<0||0!==r(l,l))&&(l=e,f=u);return 0===r(l,l)?f:void 0}},E=function(n,r,t){for(var e,u,o=(null==t?n.length:t)-(r=null==r?0:+r);o;)u=Math.random()*o--|0,e=n[o+r],n[o+r]=n[u+r],n[u+r]=e;return n},G=function(n,r){var t,e=0,u=n.length,o=-1;if(null==r)for(;++o<u;)(t=+n[o])&&(e+=t);else for(;++o<u;)(t=+r(n[o],o,n))&&(e+=t);return e},H=function(n){if(!(o=n.length))return[];for(var r=-1,t=R(n,u),e=new Array(t);++r<t;)for(var o,f=-1,l=e[r]=new Array(o);++f<o;)l[f]=n[f][r];return e},I=function(){return H(arguments)};n.bisect=i,n.bisectRight=i,n.bisectLeft=a,n.ascending=o,n.bisector=f,n.cross=c,n.descending=s,n.deviation=p,n.extent=d,n.histogram=S,n.thresholdFreedmanDiaconis=_,n.thresholdScott=z,n.thresholdSturges=L,n.max=D,n.mean=F,n.median=O,n.merge=P,n.min=R,n.pairs=h,n.permute=B,n.quantile=j,n.range=b,n.scan=C,n.shuffle=E,n.sum=G,n.ticks=q,n.tickStep=e,n.transpose=H,n.variance=v,n.zip=I,Object.defineProperty(n,"__esModule",{value:!0})});
{
"name": "d3-array",
"version": "1.1.0",
"version": "1.1.1",
"description": "Array manipulation, ordering, searching, summarizing, etc.",

@@ -41,4 +41,4 @@ "keywords": [

"tape": "4",
"uglify-js": "2"
"uglify-js": "^2.8.11"
}
}
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