Skip to content

Commit 1f3529e

Browse files
committed
Clean up deprecated methods
1 parent cd94df8 commit 1f3529e

File tree

10 files changed

+88
-450
lines changed

10 files changed

+88
-450
lines changed

src/clamp.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const fixup_rgb = color => {
1313
return c;
1414
};
1515

16-
const clampRgb = color => {
16+
export const clampRgb = color => {
1717
color = prepare(color);
1818

1919
// if the color is undefined or displayable, return it directly
@@ -25,7 +25,7 @@ const clampRgb = color => {
2525
return conv(fixup_rgb(color));
2626
};
2727

28-
const clampChroma = (color, mode = 'lch') => {
28+
export const clampChroma = (color, mode = 'lch') => {
2929
color = prepare(color);
3030

3131
// if the color is undefined or displayable, return it directly
@@ -68,15 +68,3 @@ const clampChroma = (color, mode = 'lch') => {
6868
displayable(clamped) ? clamped : { ...clamped, c: _last_good_c }
6969
);
7070
};
71-
72-
// Deprecated / no longer documented
73-
const clamp = (method = 'rgb') => {
74-
switch (method) {
75-
case 'rgb':
76-
return clampRgb;
77-
case 'lch':
78-
return clampChroma;
79-
}
80-
};
81-
82-
export { clampRgb, clampChroma, clamp };

0 commit comments

Comments
 (0)