decord/source/6800_useStableMemo.js

24 lines
534 B
JavaScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 6800
// Function ID: 6801
2026-07-20 16:05:17 +00:00
// Name: useStableMemo
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 6801]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 6800 (useStableMemo)
2026-07-29 08:29:29 +00:00
import { useRef } from "noop";
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
let closure_3 = [];
export default function useStableMemo(arg0, items) {
const tmp = useRef();
const tmp2 = useRef(closure_3);
if (tmp2.current === closure_3) {
tmp.current = arg0();
tmp2.current = items;
2026-08-05 07:35:12 +00:00
} else if (!importDefault(6801)(items, tmp2.current)) {
2026-07-20 16:05:17 +00:00
tmp.current = arg0();
tmp2.current = items;
}
return tmp.current;
};