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

13 lines
454 B
Plaintext

const isNotNull = (value) => value !== null;
function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe) {
const resolvedKeyframes = keyframes.filter(isNotNull);
const index = repeat && repeatType !== "loop" && repeat % 2 === 1
? 0
: resolvedKeyframes.length - 1;
return !index || finalKeyframe === undefined
? resolvedKeyframes[index]
: finalKeyframe;
}
export { getFinalKeyframe };