Socket
Socket
Sign inDemoInstall

colorjs

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.1.8

src/colorutils.js

2

main.js

@@ -5,3 +5,3 @@ require(

bunit: 'lib/bunit',
utils: 'src/utils',
colorutils: 'src/colorutils',
assert: 'lib/assert'

@@ -8,0 +8,0 @@ }

@@ -5,3 +5,3 @@ {

"author": "Juho Vepsalainen <bebraw@gmail.com>",
"version": "0.1.7",
"version": "0.1.8",

@@ -8,0 +8,0 @@ "main": "./lib/color.js",

@@ -6,11 +6,11 @@ (function(root, factory) {

// like Node.
module.exports = factory(require('./utils'));
module.exports = factory(require('./colorutils'));
}
else if(typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['utils'], factory);
define(['colorutils'], factory);
}
else {
// Browser globals
root.color = factory(root.utils);
root.color = factory(root.colorutils);
}

@@ -367,9 +367,7 @@ }(this, function(utils) {

return function(v) {
if(v) {
channels[name] = utils.clamp(v, 0, 1);
if(!utils.isDefined(v)) return channels[name];
return methods;
}
channels[name] = utils.clamp(v, 0, 1);
return channels[name];
return methods;
};

@@ -376,0 +374,0 @@ };

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

define(['bunit', '../src/color', 'utils', 'assert'],
define(['bunit', '../src/color', 'colorutils', 'assert'],
function(bunit, color, utils, assert) {

@@ -105,4 +105,12 @@ var rgba = color.rgba;

c[k](0.5);
assert(c[k]()).equals(0.5);
assert(c[k]()).equals(0.5);
c[k](0);
assert(c[k]()).equals(0);
c[k](-100);
assert(c[k]()).equals(0);
c[k](100);
assert(c[k]()).equals(1);
};

@@ -109,0 +117,0 @@ }, channels);

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