MCPcopy Index your code
hub / github.com/TruthHun/BookStack / cached

Function cached

static/vuejs/vue.runtime.common.js:83–89  ·  view source on GitHub ↗

* Create a cached version of a pure function.

(fn)

Source from the content-addressed store, hash-verified

81 * Create a cached version of a pure function.
82 */
83function cached (fn) {
84 var cache = Object.create(null);
85 return (function cachedFn (str) {
86 var hit = cache[str];
87 return hit || (cache[str] = fn(str))
88 })
89}
90
91/**
92 * Camelize a hyphen-delimited string.

Callers 1

Calls 1

fnFunction · 0.70

Tested by

no test coverage detected