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

simpleheat

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simpleheat - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

yarn.lock

9

package.json
{
"name": "simpleheat",
"version": "0.3.0",
"version": "0.4.0",
"description": "A tiny JavaScript library for drawing heatmaps with Canvas",

@@ -21,4 +21,4 @@ "homepage": "https://github.com/mourner/simpleheat",

"devDependencies": {
"eslint": "^1.7.3",
"eslint-config-mourner": "^1.0.1"
"eslint": "^3.13.1",
"eslint-config-mourner": "^2.0.1"
},

@@ -28,3 +28,4 @@ "eslintConfig": {

"rules": {
"new-cap": 0
"new-cap": 0,
"consistent-return": 0
}

@@ -31,0 +32,0 @@ },

@@ -54,3 +54,3 @@ 'use strict';

// create a grayscale blurred circle image that we'll use for drawing points
var circle = this._circle = document.createElement('canvas'),
var circle = this._circle = this._createCanvas(),
ctx = circle.getContext('2d'),

@@ -80,3 +80,3 @@ r2 = this._r = r + blur;

// create a 256x1 gradient that we'll use to turn a grayscale heatmap into a colored one
var canvas = document.createElement('canvas'),
var canvas = this._createCanvas(),
ctx = canvas.getContext('2d'),

@@ -89,3 +89,3 @@ gradient = ctx.createLinearGradient(0, 0, 0, 256);

for (var i in grad) {
gradient.addColorStop(i, grad[i]);
gradient.addColorStop(+i, grad[i]);
}

@@ -134,3 +134,13 @@

}
},
_createCanvas: function () {
if (typeof document !== 'undefined') {
return document.createElement('canvas');
} else {
// create a new canvas instance in node.js
// the canvas class needs to have a default constructor without any parameter
return new this._canvas.constructor();
}
}
};
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