MCPcopy Index your code
hub / github.com/tinyplex/tinybase / getCreateFunction

Function getCreateFunction

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:361–371  ·  view source on GitHub ↗
(getFunction, initFunction)

Source from the content-addressed store, hash-verified

359};
360var getRowCellFunction = (getRowCell, defaultCellValue) => isString(getRowCell) ? (getCell) => getCell(getRowCell) : getRowCell ?? (() => defaultCellValue ?? EMPTY_STRING);
361var getCreateFunction = (getFunction, initFunction) => {
362 const thingsByStore = /* @__PURE__ */ new WeakMap();
363 return (store) => {
364 if (!thingsByStore.has(store)) {
365 thingsByStore.set(store, getFunction(store));
366 }
367 const thing = thingsByStore.get(store);
368 initFunction?.(thing);
369 return thing;
370 };
371};
372var INTEGER = /^\d+$/;
373var getPoolFunctions = () => {
374 const pool = [];

Callers 1

index.jsFile · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…