Files
NapCatQQ/.pnpm-store/v3/files/e7/cc5cb9a1f2b348ee6359b6f76aa09f5b766b5a826eec8f8b8b3fedbc03d4c3869cd5a44a026a84b99b1de9ca769cf6a239b733451cadadad368014e8dc7a6a
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
490 B
Plaintext

const invisibleValues = new Set(["none", "hidden"]);
/**
* Returns a function that, when provided a progress value between 0 and 1,
* will return the "none" or "hidden" string only when the progress is that of
* the origin or target.
*/
function mixVisibility(origin, target) {
if (invisibleValues.has(origin)) {
return (p) => (p <= 0 ? origin : target);
}
else {
return (p) => (p >= 1 ? target : origin);
}
}
export { invisibleValues, mixVisibility };