MCPcopy Index your code
hub / github.com/dataease/SQLBot / createSelector2

Function createSelector2

frontend/public/swagger-ui-bundle.js:31985–32042  ·  view source on GitHub ↗
(...s)

Source from the content-addressed store, hash-verified

31983 function createSelectorCreator(s, ...o) {
31984 const i = 'function' == typeof s ? { memoize: s, memoizeOptions: o } : s,
31985 createSelector2 = (...s) => {
31986 let o,
31987 a = 0,
31988 u = 0,
31989 _ = {},
31990 w = s.pop()
31991 ;('object' == typeof w && ((_ = w), (w = s.pop())),
31992 assertIsFunction(
31993 w,
31994 `createSelector expects an output function after the inputs, but received: [${typeof w}]`
31995 ))
31996 const x = { ...i, ..._ },
31997 {
31998 memoize: C,
31999 memoizeOptions: j = [],
32000 argsMemoize: L = weakMapMemoize,
32001 argsMemoizeOptions: B = [],
32002 devModeChecks: $ = {},
32003 } = x,
32004 U = ensureIsArray(j),
32005 V = ensureIsArray(B),
32006 z = getDependencies(s),
32007 Y = C(
32008 function recomputationWrapper() {
32009 return (a++, w.apply(null, arguments))
32010 },
32011 ...U
32012 )
32013 const Z = L(
32014 function dependenciesChecker() {
32015 u++
32016 const s = (function collectInputSelectorResults(s, o) {
32017 const i = [],
32018 { length: a } = s
32019 for (let u = 0; u < a; u++) i.push(s[u].apply(null, o))
32020 return i
32021 })(z, arguments)
32022 return ((o = Y.apply(null, s)), o)
32023 },
32024 ...V
32025 )
32026 return Object.assign(Z, {
32027 resultFunc: w,
32028 memoizedResultFunc: Y,
32029 dependencies: z,
32030 dependencyRecomputations: () => u,
32031 resetDependencyRecomputations: () => {
32032 u = 0
32033 },
32034 lastResult: () => o,
32035 recomputations: () => a,
32036 resetRecomputations: () => {
32037 a = 0
32038 },
32039 memoize: C,
32040 argsMemoize: L,
32041 })
32042 }

Callers

nothing calls this directly

Calls 6

assertIsFunctionFunction · 0.85
ensureIsArrayFunction · 0.85
getDependenciesFunction · 0.85
CFunction · 0.70
LFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected