Comparing version 2.1.4 to 2.1.6
@@ -50,3 +50,3 @@ 'use strict'; | ||
if (options.inputFormat == 'hex' || options.inputFormat == 'rgb') { | ||
if (options.inputFormat === 'hex' || options.inputFormat === 'rgb') { | ||
var _propBezInterpolate = (0, _utils.propBezInterpolate)(['r', 'g', 'b'])(colorArray)(t), | ||
@@ -59,3 +59,3 @@ _propBezInterpolate2 = _slicedToArray(_propBezInterpolate, 3), | ||
outputArray.push((0, _utils.returnRGBStr)([r, g, b])); | ||
} else if (options.inputFormat == 'hsl') { | ||
} else if (options.inputFormat === 'hsl') { | ||
var _propBezInterpolate3 = (0, _utils.propBezInterpolate)(['h', 's', 'l'])(colorArray)(t), | ||
@@ -62,0 +62,0 @@ _propBezInterpolate4 = _slicedToArray(_propBezInterpolate3, 3), |
@@ -40,3 +40,3 @@ 'use strict'; | ||
// get r,g,b,h,s and l with Bezier interpolation | ||
// get r,g,b,h,s and l with Bezier interpolation | ||
// https://www.cl.cam.ac.uk/teaching/2000/AGraphHCI/SMEG/node3.html | ||
@@ -50,7 +50,7 @@ // Check issue #3 for more info | ||
return charArr.map(function (c) { | ||
if (colArr.length == 2) { | ||
if (colArr.length === 2) { | ||
v = y * colArr[0][c] + x * colArr[1][c]; | ||
} else if (colArr.length == 3) { | ||
} else if (colArr.length === 3) { | ||
v = Math.pow(y, 2) * colArr[0][c] + 2 * y * x * colArr[1][c] + Math.pow(x, 2) * colArr[2][c]; | ||
} else if (colArr.length == 4) { | ||
} else if (colArr.length === 4) { | ||
v = Math.pow(y, 3) * colArr[0][c] + 3 * Math.pow(y, 2) * x * colArr[1][c] + 3 * y * Math.pow(x, 2) * colArr[2][c] + Math.pow(x, 3) * colArr[3][c]; | ||
@@ -57,0 +57,0 @@ } |
{ | ||
"name": "gradstop", | ||
"version": "2.1.4", | ||
"version": "2.1.6", | ||
"description": "JavaScript micro library to generate monotone color schemes and equidistant gradient stops", | ||
@@ -47,3 +47,3 @@ "main": "index.js", | ||
"babelify": "^8.0.0", | ||
"browserify": "^16.2.2", | ||
"browserify": "^16.2.3", | ||
"rimraf": "^2.6.2" | ||
@@ -50,0 +50,0 @@ }, |
# gradstop | ||
<p> | ||
<a href="https://www.npmjs.com/package/gradstop"> | ||
<img src="https://badge.fury.io/js/gradstop.svg" alt="NPM Version"> | ||
</a> | ||
<a href="https://npmcharts.com/compare/gradstop"> | ||
<img src="https://img.shields.io/npm/dw/gradstop.svg" alt="NPM Downloads"> | ||
</a> | ||
<a href="https://opensource.org/licenses/MIT"> | ||
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"> | ||
</a> | ||
</p> | ||
#### JavaScript micro library to generate gradient color stops | ||
| [Demo](http://codepen.io/Siddharth11/full/RPvJmO) | [UMD Bundle](https://cdn.rawgit.com/Siddharth11/gradstop/3b5618ac/gradstopUMD.js) | | ||
| [Demo](http://codepen.io/Siddharth11/full/RPvJmO) | [UMD Bundle](https://cdn.jsdelivr.net/gh/Siddharth11/gradstop/gradstopUMD.js) | | ||
|---|---| | ||
@@ -7,0 +19,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15522
49