(fn: F, options?: Options<F>)
| 35 | } |
| 36 | |
| 37 | export function memoize<F extends Func>(fn: F, options?: Options<F>): F { |
| 38 | const cache = options && options.cache ? options.cache : cacheDefault |
| 39 | |
| 40 | const serializer = |
| 41 | options && options.serializer ? options.serializer : serializerDefault |
| 42 | |
| 43 | const strategy = |
| 44 | options && options.strategy ? options.strategy : strategyDefault |
| 45 | |
| 46 | return strategy(fn, { |
| 47 | cache, |
| 48 | serializer, |
| 49 | }) |
| 50 | } |
| 51 | |
| 52 | // |
| 53 | // Strategy |
no outgoing calls
no test coverage detected