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

cepheus

Package Overview
Dependencies
Maintainers
0
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cepheus - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

40

lib/browser/index.js

@@ -8,7 +8,7 @@ // src/utilities/intersection.ts

if (x1 === x2 && y1 === y2 || x3 === x4 && y3 === y4) {
return void 0;
return undefined;
}
const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
if (denominator === 0) {
return void 0;
return undefined;
}

@@ -18,3 +18,3 @@ const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;

if (ua < 0 || ua > 1 || ub < 0 || ub > 1) {
return void 0;
return undefined;
}

@@ -150,7 +150,7 @@ const x = x1 + ua * (x2 - x1);

const values = [];
if (base !== void 0) {
if (base !== undefined) {
weights.push(toWeight(x, y, sx, sy, interval));
values.push(base);
} else if (!extend) {
return void 0;
return undefined;
}

@@ -197,3 +197,3 @@ const n = [sx, sy + interval];

const coords = colors.get(square2)?.[color2];
if (coords !== void 0) {
if (coords !== undefined) {
weights.push(toWeight(x, y, sx2, sy2, interval) * 2);

@@ -203,6 +203,6 @@ values.push(coords);

}
return void 0;
return undefined;
});
if (values.length === 0) {
return void 0;
return undefined;
}

@@ -240,3 +240,3 @@ const normalizedWeights = normalize(weights);

const function_ = interpolator[INTERPOLATOR].state.model.alias;
const n = function_ === void 0 ? c : function_(c);
const n = function_ === undefined ? c : function_(c);
if (typeof n !== "number") {

@@ -267,5 +267,5 @@ throw new TypeError(`Unknown color ${typeof n === "string" ? n : "undefined"}`);

{
chroma: options.chroma === void 0 ? [0, 1] : [options.chroma[0], options.chroma[1]],
chroma: options.chroma === undefined ? [0, 1] : [options.chroma[0], options.chroma[1]],
darkMode: options.darkMode ?? false,
lightness: options.lightness === void 0 ? [0, 1] : [options.lightness[0], options.lightness[1]],
lightness: options.lightness === undefined ? [0, 1] : [options.lightness[0], options.lightness[1]],
model: options.model

@@ -286,3 +286,3 @@ },

let changed = false;
if (a !== void 0 && a !== state.chroma[0]) {
if (a !== undefined && a !== state.chroma[0]) {
state.chroma[0] = a;

@@ -296,3 +296,3 @@ const temporary = chroma0(x0, state.model.triangle, state);

}
if (b !== void 0 && b !== state.chroma[1]) {
if (b !== undefined && b !== state.chroma[1]) {
state.chroma[1] = b;

@@ -308,3 +308,3 @@ triangle[1] = chroma1(x0, state.model.triangle[1], state);

let changed = false;
if (b !== void 0 && b !== state.lightness[1]) {
if (b !== undefined && b !== state.lightness[1]) {
state.lightness[1] = b;

@@ -314,3 +314,3 @@ triangle[2] = lightness1(p0, p1, state);

}
if (a !== void 0 && a !== state.lightness[0]) {
if (a !== undefined && a !== state.lightness[0]) {
state.lightness[0] = a;

@@ -361,3 +361,3 @@ triangle[0] = lightness0(p0, p1, state);

const chunkIndex = Math.floor(index / n);
if (resultArray[chunkIndex] === void 0) {
if (resultArray[chunkIndex] === undefined) {
resultArray[chunkIndex] = [];

@@ -408,3 +408,3 @@ }

const value = interpolator[INTERPOLATOR];
if (!(a === void 0 && b === void 0)) {
if (!(a === undefined && b === undefined)) {
return value.updateChroma(a, b).then(() => value.state.chroma);

@@ -416,3 +416,3 @@ }

const value = interpolator[INTERPOLATOR];
if (!(a === void 0 && b === void 0)) {
if (!(a === undefined && b === undefined)) {
return value.updateLightness(a, b).then(() => value.state.lightness);

@@ -424,3 +424,3 @@ }

const value = interpolator[INTERPOLATOR];
if (darkMode2 !== void 0) {
if (darkMode2 !== undefined) {
return value.updateDarkMode(darkMode2).then(() => value.state.darkMode);

@@ -432,3 +432,3 @@ }

const value = interpolator[INTERPOLATOR];
if (model2 !== void 0) {
if (model2 !== undefined) {
return value.updateModel(model2).then(() => value.state.model);

@@ -435,0 +435,0 @@ }

@@ -8,7 +8,7 @@ // src/utilities/intersection.ts

if (x1 === x2 && y1 === y2 || x3 === x4 && y3 === y4) {
return void 0;
return undefined;
}
const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
if (denominator === 0) {
return void 0;
return undefined;
}

@@ -18,3 +18,3 @@ const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;

if (ua < 0 || ua > 1 || ub < 0 || ub > 1) {
return void 0;
return undefined;
}

@@ -150,7 +150,7 @@ const x = x1 + ua * (x2 - x1);

const values = [];
if (base !== void 0) {
if (base !== undefined) {
weights.push(toWeight(x, y, sx, sy, interval));
values.push(base);
} else if (!extend) {
return void 0;
return undefined;
}

@@ -197,3 +197,3 @@ const n = [sx, sy + interval];

const coords = colors.get(square2)?.[color2];
if (coords !== void 0) {
if (coords !== undefined) {
weights.push(toWeight(x, y, sx2, sy2, interval) * 2);

@@ -203,6 +203,6 @@ values.push(coords);

}
return void 0;
return undefined;
});
if (values.length === 0) {
return void 0;
return undefined;
}

@@ -240,3 +240,3 @@ const normalizedWeights = normalize(weights);

const function_ = interpolator[INTERPOLATOR].state.model.alias;
const n = function_ === void 0 ? c : function_(c);
const n = function_ === undefined ? c : function_(c);
if (typeof n !== "number") {

@@ -267,5 +267,5 @@ throw new TypeError(`Unknown color ${typeof n === "string" ? n : "undefined"}`);

{
chroma: options.chroma === void 0 ? [0, 1] : [options.chroma[0], options.chroma[1]],
chroma: options.chroma === undefined ? [0, 1] : [options.chroma[0], options.chroma[1]],
darkMode: options.darkMode ?? false,
lightness: options.lightness === void 0 ? [0, 1] : [options.lightness[0], options.lightness[1]],
lightness: options.lightness === undefined ? [0, 1] : [options.lightness[0], options.lightness[1]],
model: options.model

@@ -286,3 +286,3 @@ },

let changed = false;
if (a !== void 0 && a !== state.chroma[0]) {
if (a !== undefined && a !== state.chroma[0]) {
state.chroma[0] = a;

@@ -296,3 +296,3 @@ const temporary = chroma0(x0, state.model.triangle, state);

}
if (b !== void 0 && b !== state.chroma[1]) {
if (b !== undefined && b !== state.chroma[1]) {
state.chroma[1] = b;

@@ -308,3 +308,3 @@ triangle[1] = chroma1(x0, state.model.triangle[1], state);

let changed = false;
if (b !== void 0 && b !== state.lightness[1]) {
if (b !== undefined && b !== state.lightness[1]) {
state.lightness[1] = b;

@@ -314,3 +314,3 @@ triangle[2] = lightness1(p0, p1, state);

}
if (a !== void 0 && a !== state.lightness[0]) {
if (a !== undefined && a !== state.lightness[0]) {
state.lightness[0] = a;

@@ -361,3 +361,3 @@ triangle[0] = lightness0(p0, p1, state);

const chunkIndex = Math.floor(index / n);
if (resultArray[chunkIndex] === void 0) {
if (resultArray[chunkIndex] === undefined) {
resultArray[chunkIndex] = [];

@@ -408,3 +408,3 @@ }

const value = interpolator[INTERPOLATOR];
if (!(a === void 0 && b === void 0)) {
if (!(a === undefined && b === undefined)) {
return value.updateChroma(a, b).then(() => value.state.chroma);

@@ -416,3 +416,3 @@ }

const value = interpolator[INTERPOLATOR];
if (!(a === void 0 && b === void 0)) {
if (!(a === undefined && b === undefined)) {
return value.updateLightness(a, b).then(() => value.state.lightness);

@@ -424,3 +424,3 @@ }

const value = interpolator[INTERPOLATOR];
if (darkMode2 !== void 0) {
if (darkMode2 !== undefined) {
return value.updateDarkMode(darkMode2).then(() => value.state.darkMode);

@@ -432,3 +432,3 @@ }

const value = interpolator[INTERPOLATOR];
if (model2 !== void 0) {
if (model2 !== undefined) {
return value.updateModel(model2).then(() => value.state.model);

@@ -435,0 +435,0 @@ }

{
"name": "cepheus",
"description": "",
"version": "1.2.1",
"version": "1.2.2",
"author": {

@@ -12,18 +12,18 @@ "name": "escapace",

"@ls-lint/ls-lint": "2.2.3",
"@types/node": "22.10.1",
"@vitest/coverage-v8": "2.1.6",
"eslint": "9.15.0",
"eslint-config-escapace": "5.3.1",
"esroll": "0.3.0",
"jsdom": "25.0.1",
"prettier": "3.4.1",
"@types/node": "22.13.1",
"@vitest/coverage-v8": "3.0.5",
"eslint": "9.19.0",
"eslint-config-escapace": "5.4.2",
"esroll": "0.4.0",
"jsdom": "26.0.0",
"prettier": "3.4.2",
"prettier-config-escapace": "1.2.1",
"syncpack": "13.0.0",
"syncpack": "13.0.2",
"tsx": "4.19.2",
"typescript": "5.6.2",
"vitest": "2.1.6"
"typescript": "5.7.3",
"vitest": "3.0.5"
},
"engines": {
"node": ">=20.15.0",
"pnpm": ">=9.11.0"
"node": ">=22.13.1",
"pnpm": ">=9.15.4"
},

@@ -30,0 +30,0 @@ "exports": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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