decord/source/1685_weakMap.js
2026-08-15 05:55:55 +00:00

40 lines
815 B
JavaScript

// Module ID: 1685
// Function ID: 1686
// Name: weakMap
// Dependencies: [1657]
// Module 1685 (weakMap)
import isJest from "isJest";
isJest = isJest.shouldBeUseWeb();
const SymbolResult = Symbol("shareable flag");
let c0 = SymbolResult;
let weakMap = null;
if (!isJest) {
const _WeakMap = WeakMap;
weakMap = new WeakMap();
}
const obj = { set: null, get: null };
if (isJest) {
obj[0] = function set() {
};
obj[1] = function get() {
return null;
};
let tmp7 = obj;
} else {
obj[0] = function set(arg0, arg1) {
let tmp = arg1;
if (!arg1) {
tmp = closure_0;
}
const result = weakMap.set(arg0, tmp);
};
const get = weakMap.get;
obj[1] = get.bind(weakMap);
tmp7 = obj;
}
export const shareableMappingFlag = SymbolResult;
export const shareableMappingCache = tmp7;