New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lightning-client-utils

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightning-client-utils - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

20

index.js
var _ = require('lodash');
var request = require('superagent');
var d3 = require('d3');
var d3Color = require('d3-color');
var d3Scale = require('d3-color');
var colorbrewer = require('colorbrewer')

@@ -68,4 +70,4 @@ var Color = require('color');

label = data.label
var mn = d3.min(label, function(d) {return d; });
var mx = d3.max(label, function(d) {return d; });
var mn = Math.min.apply(null, label);
var mx = Math.max.apply(null, label);
var n = mx - mn + 1

@@ -75,3 +77,3 @@ var colors = this.getColors(n)

// get an array of d3 colors
retColor = label.map(function(d) {return d3.rgb(colors[d - mn])});
retColor = label.map(function(d) {return d3Color.rgb(colors[d - mn])});

@@ -82,3 +84,3 @@ } else if (data.hasOwnProperty('color')) {

color = data.color
retColor = color.map(function(d) {return d3.rgb(d[0], d[1], d[2])})
retColor = color.map(function(d) {return d3Color.rgb(d[0], d[1], d[2])})

@@ -100,10 +102,10 @@ } else if (data.hasOwnProperty('value')) {

// get min and max of value data
var vmin = d3.min(value)
var vmax = d3.max(value)
var vmin = Math.min.apply(null, value);
var vmax = Math.max.apply(null, value);
// set up scales
var domain = this.linspace(vmin, vmax, ncolor)
var scale = d3.scale.linear().domain(domain).range(color);
var scale = d3Scale.linear().domain(domain).range(color);
retColor = value.map(function(d) {return d3.rgb(scale(d))})
retColor = value.map(function(d) {return d3Color.rgb(scale(d))})

@@ -110,0 +112,0 @@ } else {

{
"name": "lightning-client-utils",
"version": "0.6.4",
"version": "0.6.5",
"description": "utilities for lightning visualizations to be used in the browser",

@@ -18,7 +18,8 @@ "main": "index.js",

"dependencies": {
"color": "^0.7.3",
"colorbrewer": "0.0.2",
"d3-color": "^0.2.4",
"d3-scale": "^0.1.1",
"lodash": "^2.4.1",
"superagent": "^0.21.0",
"d3": "~3.4.9",
"colorbrewer": "0.0.2",
"color": "^0.7.3"
"superagent": "^0.21.0"
},

@@ -25,0 +26,0 @@ "devDependencies": {},

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