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

d3-scale-cluster

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-scale-cluster - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

dist/d3-scale-cluster.min.js

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

!function(r){function n(e){if(t[e])return t[e].exports;var a=t[e]={exports:{},id:e,loaded:!1};return r[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}var t={};return n.m=r,n.c=t,n.p="",n(0)}([function(r,n,t){function e(){function r(){if(!(o.length<=2)){n=a(t,o.length),u=[];for(var r=0;r<n.length;r++)u.push(n[r][0])}}var n=[],t=[],o=[],u=[],f=function(r){if(0!==n.length){for(var t=u.length-1;t>=0;t--)if(r>=u[t])return o[t];return o[0]}};return f.domain=function(){return arguments.length?(t=arguments[0],r(),f):t},f.range=function(){if(arguments.length){var n=arguments[0],t=n.length!==o.length;return o=n,t&&r(),f}return o},f.invertExtent=function(r){for(var n=NaN,t=NaN,e=0;e<o.length;e++)if(o[e]===r){n=u[e],t=e+1<o.length?u[e+1]:NaN;break}return[n,t]},f.clusters=function(){return u.slice(1)},f.copy=function(){return e().domain(t).range(o)},f}var a=t(1);"object"==typeof d3&&(d3.scaleCluster=e),r.exports=e},function(r,n){function t(r){return r.slice().sort(function(r,n){return r-n})}function e(r){for(var n,t=0,e=0;e<r.length;e++)0!==e&&r[e]===n||(n=r[e],t++);return t}function a(r,n){for(var t=[],e=0;e<r;e++){for(var a=[],o=0;o<n;o++)a.push(0);t.push(a)}return t}function o(r,n,t,e){var a;if(r>0){var o=(t[n]-t[r-1])/(n-r+1);a=e[n]-e[r-1]-(n-r+1)*o*o}else a=e[n]-t[n]*t[n]/(n+1);return a<0?0:a}function u(r,n,t,e,a,f,i){if(!(r>n)){var l=Math.floor((r+n)/2);e[t][l]=e[t-1][l-1],a[t][l]=l;var h=t;r>t&&(h=Math.max(h,a[t][r-1]||0)),h=Math.max(h,a[t-1][l]||0);var c=l-1;n<e.length-1&&(c=Math.min(c,a[t][n+1]||0));for(var v,g,s,p,d=c;d>=h&&(v=o(d,l,f,i),!(v+e[t-1][h-1]>=e[t][l]));--d)g=o(h,l,f,i),s=g+e[t-1][h-1],s<e[t][l]&&(e[t][l]=s,a[t][l]=h),h++,p=v+e[t-1][d-1],p<e[t][l]&&(e[t][l]=p,a[t][l]=d);u(r,l-1,t,e,a,f,i),u(l+1,n,t,e,a,f,i)}}function f(r,n,t){for(var e=n[0].length,a=new Array(e),f=new Array(e),i=r[Math.floor(e/2)],l=0;l<e;++l)0===l?(a[0]=r[0]-i,f[0]=(r[0]-i)*(r[0]-i)):(a[l]=a[l-1]+r[l]-i,f[l]=f[l-1]+(r[l]-i)*(r[l]-i)),n[0][l]=o(0,l,a,f),t[0][l]=0;for(var h,c=1;c<n.length;++c)h=c<n.length-1?c:e-1,u(h,e-1,c,n,t,a,f)}function i(r,n){if(n>r.length)throw new Error("Cannot generate more classes than there are data values");var o=r.length,u=t(r),i=e(u);if(1===i)return[u];n=Math.min(i,n);var l=a(n,o),h=a(n,o);f(u,l,h);for(var c=[],v=h[0].length-1,g=h.length-1;g>=0;g--){var s=h[g][v];c[g]=u.slice(s,v+1),g>0&&(v=s-1)}return c}r.exports=i}]);
!function(r){function n(e){if(t[e])return t[e].exports;var a=t[e]={exports:{},id:e,loaded:!1};return r[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}var t={};return n.m=r,n.c=t,n.p="",n(0)}([function(r,n,t){function e(){function r(){if(!(o.length<=2)){n=a(t,Math.min(t.length,o.length)),u=[];for(var r=0;r<n.length;r++)u.push(n[r][0])}}var n=[],t=[],o=[],u=[],f=function(r){if(0!==n.length){for(var t=u.length-1;t>=0;t--)if(r>=u[t])return o[t];return o[0]}};return f.domain=function(){return arguments.length?(t=arguments[0],r(),f):t},f.range=function(){if(arguments.length){var n=arguments[0],t=n.length!==o.length;return o=n,t&&r(),f}return o},f.invertExtent=function(r){for(var n=NaN,t=NaN,e=0;e<o.length;e++)if(o[e]===r){n=u[e],t=e+1<o.length?u[e+1]:NaN;break}return[n,t]},f.clusters=function(){return u.slice(1)},f.copy=function(){return e().domain(t).range(o)},f}var a=t(1);"object"==typeof d3&&(d3.scaleCluster=e),r.exports=e},function(r,n){function t(r){return r.slice().sort(function(r,n){return r-n})}function e(r){for(var n,t=0,e=0;e<r.length;e++)0!==e&&r[e]===n||(n=r[e],t++);return t}function a(r,n){for(var t=[],e=0;e<r;e++){for(var a=[],o=0;o<n;o++)a.push(0);t.push(a)}return t}function o(r,n,t,e){var a;if(r>0){var o=(t[n]-t[r-1])/(n-r+1);a=e[n]-e[r-1]-(n-r+1)*o*o}else a=e[n]-t[n]*t[n]/(n+1);return a<0?0:a}function u(r,n,t,e,a,f,i){if(!(r>n)){var l=Math.floor((r+n)/2);e[t][l]=e[t-1][l-1],a[t][l]=l;var h=t;r>t&&(h=Math.max(h,a[t][r-1]||0)),h=Math.max(h,a[t-1][l]||0);var c=l-1;n<e.length-1&&(c=Math.min(c,a[t][n+1]||0));for(var v,g,s,p,d=c;d>=h&&(v=o(d,l,f,i),!(v+e[t-1][h-1]>=e[t][l]));--d)g=o(h,l,f,i),s=g+e[t-1][h-1],s<e[t][l]&&(e[t][l]=s,a[t][l]=h),h++,p=v+e[t-1][d-1],p<e[t][l]&&(e[t][l]=p,a[t][l]=d);u(r,l-1,t,e,a,f,i),u(l+1,n,t,e,a,f,i)}}function f(r,n,t){for(var e=n[0].length,a=new Array(e),f=new Array(e),i=r[Math.floor(e/2)],l=0;l<e;++l)0===l?(a[0]=r[0]-i,f[0]=(r[0]-i)*(r[0]-i)):(a[l]=a[l-1]+r[l]-i,f[l]=f[l-1]+(r[l]-i)*(r[l]-i)),n[0][l]=o(0,l,a,f),t[0][l]=0;for(var h,c=1;c<n.length;++c)h=c<n.length-1?c:e-1,u(h,e-1,c,n,t,a,f)}function i(r,n){if(n>r.length)throw new Error("Cannot generate more classes than there are data values");var o=r.length,u=t(r),i=e(u);if(1===i)return[u];n=Math.min(i,n);var l=a(n,o),h=a(n,o);f(u,l,h);for(var c=[],v=h[0].length-1,g=h.length-1;g>=0;g--){var s=h[g][v];c[g]=u.slice(s,v+1),g>0&&(v=s-1)}return c}r.exports=i}]);
{
"name": "d3-scale-cluster",
"version": "1.1.3",
"version": "1.1.4",
"description": "D3 scale that clusters data into discrete groups",

@@ -5,0 +5,0 @@ "repository": "schnerd/d3-scale-cluster",

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