Skip to content

Commit

Permalink
šŸ› fix: fixed bug when removing non-channel characters from the passedā€¦
Browse files Browse the repository at this point in the history
ā€¦ in colorspace (fix #209)

fix #209
  • Loading branch information
prjctimg committed Aug 25, 2024
1 parent 361a682 commit 266654c
Show file tree
Hide file tree
Showing 2 changed files with 296 additions and 314 deletions.
8 changes: 4 additions & 4 deletions src/internal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ const pltrconfg = {
};

function gmchn(m = '', i) {
const o = m.substring(m.length - 3);
m = m.replace(/\d|ok/g, '');

return or(and(i, o.charAt(i)), o.split(''));
return or(and(i, m.charAt(i)), m.split(''));
}

function mult(x, y) {
Expand Down Expand Up @@ -522,14 +522,14 @@ function getSrcMode(c) {
);
}

function isValidArgs(argsList, minArgs=1) {
function isValidArgs(argsList, minArgs = 1) {
const len = argsList?.length;

if (gte(len, minArgs)) {
return true;
} else {
throw new Error(
`Color token collection cannot have a length smaller than 1 or be of type ${typeof argsList }`
`Color token collection cannot have a length smaller than 1 or be of type ${typeof argsList}`
);
}
}
Expand Down
Loading

0 comments on commit 266654c

Please sign in to comment.