MCPcopy Create free account
hub / github.com/GoogleChrome/samples / contextMap

Method contextMap

sqlite-wasm-cos/sqlite3-node.mjs:8916–8921  ·  view source on GitHub ↗

Returns this object's mapping for the given context key, in the form of an an array, creating the mapping if needed. The key may be anything suitable for use in a Map. The returned array is intended to be used as a pair of [JSValue, WasmFuncPtr], where the first element

(key)

Source from the content-addressed store, hash-verified

8914 to this.convertArg() and the second is its WASM form.
8915 */
8916 contextMap(key){
8917 const cm = (this.__cmap || (this.__cmap = new Map));
8918 let rc = cm.get(key);
8919 if(undefined===rc) cm.set(key, (rc = []));
8920 return rc;
8921 }
8922
8923 /**
8924 Gets called via xWrap() to "convert" v to a WASM-bound function

Callers 1

convertArgMethod · 0.95

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected