Skip to content

Commit

Permalink
🐛 fix(collection.ts): filterBy now works as expected (fix #217)
Browse files Browse the repository at this point in the history
fix #217
  • Loading branch information
prjctimg committed Sep 29, 2024
1 parent d07000f commit 6de527a
Show file tree
Hide file tree
Showing 13 changed files with 748 additions and 3,034 deletions.
472 changes: 231 additions & 241 deletions lib/collection.ts

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions lib/generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ import {
min,
max,
values,
factorIterator,
iterator,
entries,
and,
eq,
adjustHue,
rand,
inRange,
isValidArgs,

not,
keys,
} from "./internal.js";
Expand Down Expand Up @@ -398,7 +398,7 @@ function discover(
colors: Collection = [],
options: DiscoverOptions
): Collection {
if (isValidArgs(colors, 4)) {

// Initialize and sanitize parameters
const colorTokenValues = values(colors),
colorTokenKeys = keys(colors);
Expand Down Expand Up @@ -451,7 +451,7 @@ function discover(

// @ts-ignore
return palettes;
}

}

/**
Expand Down Expand Up @@ -596,7 +596,7 @@ function scheme(
return palettes;
};

return factorIterator(kind, callback, keys(PALETTE_TYPES));
return iterator(kind, callback, keys(PALETTE_TYPES));
}

export { pair, discover, hueshift, pastel, earthtone, scheme, interpolator };
Loading

0 comments on commit 6de527a

Please sign in to comment.