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

d3-sankey

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-sankey - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

2

build/d3-sankey.js

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

// https://github.com/d3/d3-sankey Version 0.6.0. Copyright 2017 Mike Bostock.
// https://github.com/d3/d3-sankey Version 0.6.1. Copyright 2017 Mike Bostock.
(function (global, factory) {

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

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

// https://github.com/d3/d3-sankey Version 0.6.0. Copyright 2017 Mike Bostock.
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array"),require("d3-collection"),require("d3-shape")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(n.d3=n.d3||{},n.d3,n.d3,n.d3)}(this,function(n,t,e,r){"use strict";function o(n){return function(){return n}}function u(n,t){return c(n.source,t.source)||n.index-t.index}function i(n,t){return c(n.target,t.target)||n.index-t.index}function c(n,t){return n.y0-t.y0}function f(n){return n.value}function s(n){return(n.y0+n.y1)/2}function a(n){return s(n.source)*n.value}function d(n){return s(n.target)*n.value}function h(n){return n.nodes}function l(n){return n.links}function y(n){return[n.source.x1,n.y0]}function g(n){return[n.target.x0,n.y1]}var k=function(){function n(){var n={nodes:z.apply(null,arguments),links:j.apply(null,arguments)};return r(n),y(n),g(n),v(n),E(n),n}function r(n){n.nodes.forEach(function(n,t){n.index=t,n.sourceLinks=[],n.targetLinks=[]}),n.links.forEach(function(t,e){var r=t.source,o=t.target;"number"==typeof r&&(r=t.source=n.nodes[t.source]),"number"==typeof o&&(o=t.target=n.nodes[t.target]),t.index=e,r.sourceLinks.push(t),o.targetLinks.push(t)})}function y(n){n.nodes.forEach(function(n){n.value=Math.max(t.sum(n.sourceLinks,f),t.sum(n.targetLinks,f))})}function g(n){for(var t,e=n.nodes,r=0;e.length;)t=[],e.forEach(function(n){n.depth=r,n.sourceLinks.forEach(function(n){t.indexOf(n.target)<0&&t.push(n.target)})}),e=t,++r;k(n,r),p(n,r)}function k(n,t){n.nodes.forEach(function(n){n.sourceLinks.length||(n.depth=t-1)})}function p(n,t){var e=(m-L-b)/(t-1);n.nodes.forEach(function(n){n.x1=(n.x0=L+n.depth*e)+b})}function v(n){function r(){o.forEach(function(n){var t,e,r,o=x,u=n.length;for(n.sort(c),r=0;r<u;++r)t=n[r],e=o-t.y0,e>0&&(t.y0+=e,t.y1+=e),o=t.y1+q;if((e=o-q-w)>0)for(o=t.y0-=e,t.y1-=e,r=u-2;r>=0;--r)t=n[r],e=t.y1+q-o,e>0&&(t.y0-=e,t.y1-=e),o=t.y0})}var o=e.nest().key(function(n){return n.depth}).sortKeys(t.ascending).entries(n.nodes).map(function(n){return n.values});!function(){var e=t.min(o,function(n){return(w-x-(n.length-1)*q)/t.sum(n,f)});o.forEach(function(n){n.forEach(function(n,t){n.y1=(n.y0=t)+n.value*e})}),n.links.forEach(function(n){n.width=n.value*e})}(),r();for(var u=1,i=H;i>0;--i)!function(n){o.slice().reverse().forEach(function(e){e.forEach(function(e){if(e.sourceLinks.length){var r=(t.sum(e.sourceLinks,d)/t.sum(e.sourceLinks,f)-s(e))*n;e.y0+=r,e.y1+=r}})})}(u*=.99),r(),function(n){o.forEach(function(e){e.forEach(function(e){if(e.targetLinks.length){var r=(t.sum(e.targetLinks,a)/t.sum(e.targetLinks,f)-s(e))*n;e.y0+=r,e.y1+=r}})})}(u),r()}function E(n){n.nodes.forEach(function(n){n.sourceLinks.sort(i),n.targetLinks.sort(u)}),n.nodes.forEach(function(n){var t=n.y0,e=t;n.sourceLinks.forEach(function(n){n.y0=t+n.width/2,t+=n.width}),n.targetLinks.forEach(function(n){n.y1=e+n.width/2,e+=n.width})})}var L=0,x=0,m=1,w=1,b=24,q=8,z=h,j=l,H=32;return n.update=function(n){return E(n),n},n.nodeWidth=function(t){return arguments.length?(b=+t,n):b},n.nodePadding=function(t){return arguments.length?(q=+t,n):q},n.nodes=function(t){return arguments.length?(z="function"==typeof t?t:o(t),n):z},n.links=function(t){return arguments.length?(j="function"==typeof t?t:o(t),n):j},n.size=function(t){return arguments.length?(L=x=0,m=+t[0],w=+t[1],n):[m-L,w-x]},n.extent=function(t){return arguments.length?(L=+t[0][0],m=+t[1][0],x=+t[0][1],w=+t[1][1],n):[[L,x],[m,w]]},n.iterations=function(t){return arguments.length?(H=+t,n):H},n},p=function(){return r.linkHorizontal().source(y).target(g)};n.sankey=k,n.sankeyLinkHorizontal=p,Object.defineProperty(n,"__esModule",{value:!0})});
// https://github.com/d3/d3-sankey Version 0.6.1. Copyright 2017 Mike Bostock.
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array"),require("d3-collection"),require("d3-shape")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-collection","d3-shape"],t):t(n.d3=n.d3||{},n.d3,n.d3,n.d3)}(this,function(n,t,e,r){"use strict";function o(n){return function(){return n}}function u(n,t){return c(n.source,t.source)||n.index-t.index}function i(n,t){return c(n.target,t.target)||n.index-t.index}function c(n,t){return n.y0-t.y0}function f(n){return n.value}function s(n){return(n.y0+n.y1)/2}function a(n){return s(n.source)*n.value}function d(n){return s(n.target)*n.value}function h(n){return n.nodes}function l(n){return n.links}function y(n){return[n.source.x1,n.y0]}function g(n){return[n.target.x0,n.y1]}var k=function(){function n(){var n={nodes:z.apply(null,arguments),links:j.apply(null,arguments)};return r(n),y(n),g(n),v(n),E(n),n}function r(n){n.nodes.forEach(function(n,t){n.index=t,n.sourceLinks=[],n.targetLinks=[]}),n.links.forEach(function(t,e){var r=t.source,o=t.target;"number"==typeof r&&(r=t.source=n.nodes[t.source]),"number"==typeof o&&(o=t.target=n.nodes[t.target]),t.index=e,r.sourceLinks.push(t),o.targetLinks.push(t)})}function y(n){n.nodes.forEach(function(n){n.value=Math.max(t.sum(n.sourceLinks,f),t.sum(n.targetLinks,f))})}function g(n){for(var t,e=n.nodes,r=0;e.length;)t=[],e.forEach(function(n){n.depth=r,n.sourceLinks.forEach(function(n){t.indexOf(n.target)<0&&t.push(n.target)})}),e=t,++r;k(n,r),p(n,r)}function k(n,t){n.nodes.forEach(function(n){n.sourceLinks.length||(n.depth=t-1)})}function p(n,t){var e=(m-L-b)/(t-1);n.nodes.forEach(function(n){n.x1=(n.x0=L+n.depth*e)+b})}function v(n){function r(){o.forEach(function(n){var t,e,r,o=x,u=n.length;for(n.sort(c),r=0;r<u;++r)(e=o-(t=n[r]).y0)>0&&(t.y0+=e,t.y1+=e),o=t.y1+q;if((e=o-q-w)>0)for(o=t.y0-=e,t.y1-=e,r=u-2;r>=0;--r)(e=(t=n[r]).y1+q-o)>0&&(t.y0-=e,t.y1-=e),o=t.y0})}var o=e.nest().key(function(n){return n.depth}).sortKeys(t.ascending).entries(n.nodes).map(function(n){return n.values});!function(){var e=t.min(o,function(n){return(w-x-(n.length-1)*q)/t.sum(n,f)});o.forEach(function(n){n.forEach(function(n,t){n.y1=(n.y0=t)+n.value*e})}),n.links.forEach(function(n){n.width=n.value*e})}(),r();for(var u=1,i=H;i>0;--i)!function(n){o.slice().reverse().forEach(function(e){e.forEach(function(e){if(e.sourceLinks.length){var r=(t.sum(e.sourceLinks,d)/t.sum(e.sourceLinks,f)-s(e))*n;e.y0+=r,e.y1+=r}})})}(u*=.99),r(),function(n){o.forEach(function(e){e.forEach(function(e){if(e.targetLinks.length){var r=(t.sum(e.targetLinks,a)/t.sum(e.targetLinks,f)-s(e))*n;e.y0+=r,e.y1+=r}})})}(u),r()}function E(n){n.nodes.forEach(function(n){n.sourceLinks.sort(i),n.targetLinks.sort(u)}),n.nodes.forEach(function(n){var t=n.y0,e=t;n.sourceLinks.forEach(function(n){n.y0=t+n.width/2,t+=n.width}),n.targetLinks.forEach(function(n){n.y1=e+n.width/2,e+=n.width})})}var L=0,x=0,m=1,w=1,b=24,q=8,z=h,j=l,H=32;return n.update=function(n){return E(n),n},n.nodeWidth=function(t){return arguments.length?(b=+t,n):b},n.nodePadding=function(t){return arguments.length?(q=+t,n):q},n.nodes=function(t){return arguments.length?(z="function"==typeof t?t:o(t),n):z},n.links=function(t){return arguments.length?(j="function"==typeof t?t:o(t),n):j},n.size=function(t){return arguments.length?(L=x=0,m=+t[0],w=+t[1],n):[m-L,w-x]},n.extent=function(t){return arguments.length?(L=+t[0][0],m=+t[1][0],x=+t[0][1],w=+t[1][1],n):[[L,x],[m,w]]},n.iterations=function(t){return arguments.length?(H=+t,n):H},n},p=function(){return r.linkHorizontal().source(y).target(g)};n.sankey=k,n.sankeyLinkHorizontal=p,Object.defineProperty(n,"__esModule",{value:!0})});
{
"name": "d3-sankey",
"version": "0.6.0",
"version": "0.6.1",
"description": "Visualize flow between nodes in a directed acyclic network.",

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

"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-sankey.js -c -m -o build/d3-sankey.min.js",
"prepublish": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-sankey.js -c -m -o build/d3-sankey.min.js",
"postpublish": "git push && git push --tags && zip -j build/d3-sankey.zip -- LICENSE README.md build/d3-sankey.js build/d3-sankey.min.js"

@@ -33,12 +33,11 @@ },

"d3-collection": "1",
"d3-interpolate": "1",
"d3-shape": "^1.2.0"
},
"devDependencies": {
"eslint": "3",
"eslint": "4",
"package-preamble": "0.1.0",
"rollup": "0.41",
"rollup": "0.42",
"tape": "4",
"uglify-js": "2"
"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