mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-17 19:05:32 -04:00
remove mem
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import hexToRgba from "hex-to-rgba";
|
||||
import mem from "mem";
|
||||
import hexToRgbaOrig from "hex-to-rgba";
|
||||
|
||||
// removes spaces from default hex-to-rgba output and caches the result
|
||||
const memoized = mem((color: string, alpha?: number) => hexToRgba(color, alpha).replace(/\s/g, ""), {
|
||||
cacheKey: (arguments_) => arguments_.join(","), // https://github.com/sindresorhus/mem#caching-strategy
|
||||
});
|
||||
// removes spaces from default hex-to-rgba output
|
||||
const hexToRgba = (color: string, alpha?: number) => hexToRgbaOrig(color, alpha).replace(/\s/g, "");
|
||||
|
||||
export default memoized;
|
||||
export default hexToRgba;
|
||||
|
Reference in New Issue
Block a user