mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
14 lines
433 B
JavaScript
14 lines
433 B
JavaScript
//#region src/core/media-tracks/utils.ts
|
|
const privateProps = /* @__PURE__ */ new WeakMap();
|
|
function getPrivate(instance) {
|
|
return privateProps.get(instance) ?? setPrivate(instance, {});
|
|
}
|
|
function setPrivate(instance, props) {
|
|
let saved = privateProps.get(instance);
|
|
if (!saved) privateProps.set(instance, saved = {});
|
|
return Object.assign(saved, props);
|
|
}
|
|
//#endregion
|
|
export { getPrivate };
|
|
|
|
//# sourceMappingURL=utils.js.map
|