Socket
Socket
Sign inDemoInstall

colormap

Package Overview
Dependencies
2
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.2 to 1.3.0

19

index.js

@@ -26,13 +26,18 @@ /*

colormap = spec.colormap || 'jet';
nshades = spec.nshades || 72;
format = spec.format || 'hex';
if (!spec.colormap) colormap = 'jet';
colormap = colormap.toLowerCase();
if (typeof spec.colormap === 'string') {
colormap = spec.colormap.toLowerCase();
if (!(colormap in colorScale)) {
throw Error(colormap + ' not a supported colorscale');
if (!(colormap in colorScale)) {
throw Error(colormap + ' not a supported colorscale');
}
cmap = colorScale[colormap];
} else if (Array.isArray(spec.colormap)) {
cmap = spec.colormap;
}
cmap = colorScale[colormap];
nshades = spec.nshades || 72;
format = spec.format || 'hex';

@@ -39,0 +44,0 @@ if (cmap.length > nshades) {

{
"name": "colormap",
"version": "1.2.2",
"version": "1.3.0",
"description": "Easily output great looking predefined hex or rgb color maps",
"author": "bpostlethwaite",
"dependencies": {
"arraytools": "^1.0.0"
"arraytools": "^1.0.0",
"tinycolor2": "^1.0.0"
},

@@ -9,0 +10,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc