(getValue)
| 24078 | }; |
| 24079 | } |
| 24080 | function createMemoizer(getValue) { |
| 24081 | if (!_weakMap) // Without a `WeakMap` implementation, memoization is not possible. |
| 24082 | return getValue; |
| 24083 | var cache = new _weakMap(); |
| 24084 | function memoizedGetValue(input) { |
| 24085 | if (!input || typeof input !== "function" && typeof input !== "object") // A WeakMap can only be used to test against reference values, i.e. 'function' and 'object'. |
| 24086 | // All other inputs cannot be memoized against in this manner. |
| 24087 | return getValue(input); |
| 24088 | if (cache.has(input)) return cache.get(input); |
| 24089 | var value = getValue(input); |
| 24090 | cache.set(input, value); |
| 24091 | return value; |
| 24092 | } |
| 24093 | return memoizedGetValue; |
| 24094 | } |
| 24095 | function _normalizeArg(val) { |
| 24096 | if (!val) return _emptyObject; |
| 24097 | else if (typeof val === "object" || typeof val === "function") return val; |
nothing calls this directly
no outgoing calls
no test coverage detected