decord/source/677_useStoreWithEqualityFn.js

54 lines
1.5 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 677
2026-07-24 07:16:23 +00:00
// Function ID: 8383
2026-07-20 16:05:17 +00:00
// Name: useStoreWithEqualityFn
2026-07-23 10:11:24 +00:00
// Dependencies: [31, 678, 622]
2026-07-20 16:05:17 +00:00
// Exports: createWithEqualityFn
// Module 677 (useStoreWithEqualityFn)
2026-07-23 10:11:24 +00:00
import result from "result";
function useStoreWithEqualityFn(createJSONStorage, arg1, shallow) {
2026-07-20 16:05:17 +00:00
if (arguments.length > 1) {
if (undefined !== arguments[1]) {
let tmp = arguments[1];
}
let tmp2;
if (arguments.length > 2) {
tmp2 = arguments[2];
}
2026-07-23 10:11:24 +00:00
const obj = require(678) /* is */;
const syncExternalStoreWithSelector = obj.useSyncExternalStoreWithSelector(createJSONStorage.subscribe, createJSONStorage.getState, createJSONStorage.getInitialState, tmp, tmp2);
2026-07-22 07:54:56 +00:00
const debugValue = closure_2.useDebugValue(syncExternalStoreWithSelector);
2026-07-20 16:05:17 +00:00
return syncExternalStoreWithSelector;
}
tmp = identity;
}
function identity(arg0) {
return arg0;
}
function createWithEqualityFnImpl(arg0, arg1) {
2026-07-23 10:11:24 +00:00
const _require = arg1;
store = _require(store[2]).createStore(arg0);
2026-07-20 16:05:17 +00:00
function useBoundStoreWithEqualityFn(arg0) {
if (arguments.length > 1) {
if (undefined !== arguments[1]) {
let tmp3 = arguments[1];
}
return tmp(tmp2, arg0, tmp3);
}
2026-07-23 10:11:24 +00:00
tmp3 = closure_0;
2026-07-20 16:05:17 +00:00
}
const merged = Object.assign(useBoundStoreWithEqualityFn, store);
return useBoundStoreWithEqualityFn;
}
export const createWithEqualityFn = function createWithEqualityFn(initState, shallow) {
if (initState) {
let tmpResult = tmp(initState, shallow);
} else {
tmpResult = tmp;
}
return tmpResult;
};
export { useStoreWithEqualityFn };