MCPcopy Create free account
hub / github.com/dev-formata-io/stof / debugString

Function debugString

web/pkg/stof.js:19–82  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

17 }
18 /**
19 * Give this document network access (the Http library, using fetch). Off by default.
20 */
21 allowHttp() {
22 wasm.stof_allowHttp(this.__wbg_ptr);
23 }
24 /**
25 * Binary export (Uint8Array), using a format of choice.
26 * Format can also be a content type (for HTTP-like situations).
27 * @param {string} format
28 * @param {any} node
29 * @returns {any}
30 */
31 binaryExport(format, node) {
32 const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
33 const len0 = WASM_VECTOR_LEN;
34 const ret = wasm.stof_binaryExport(this.__wbg_ptr, ptr0, len0, node);
35 if (ret[2]) {
36 throw takeFromExternrefTable0(ret[1]);
37 }
38 return takeFromExternrefTable0(ret[0]);
39 }
40 /**
41 * Binary import (Uint8Array), using a format of choice.
42 * Format can also be a content type (for HTTP-like situations).
43 * @param {any} bytes
44 * @param {string} format
45 * @param {any} node
46 * @param {string} profile
47 * @returns {boolean}
48 */
49 binaryImport(bytes, format, node, profile) {
50 const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
51 const len0 = WASM_VECTOR_LEN;
52 const ptr1 = passStringToWasm0(profile, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
53 const len1 = WASM_VECTOR_LEN;
54 const ret = wasm.stof_binaryImport(this.__wbg_ptr, bytes, ptr0, len0, node, ptr1, len1);
55 if (ret[2]) {
56 throw takeFromExternrefTable0(ret[1]);
57 }
58 return ret[0] !== 0;
59 }
60 /**
61 * Call a singular function in the document (by path).
62 * If no arguments, pass undefined as args.
63 * Otherwise, pass an array of arguments as args.
64 * @param {string} path
65 * @param {any} args
66 * @param {Function} acquire
67 * @param {Function} release
68 * @returns {Promise<any>}
69 */
70 call_with_gate(path, args, acquire, release) {
71 const ptr0 = passStringToWasm0(path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
72 const len0 = WASM_VECTOR_LEN;
73 const ret = wasm.stof_call_with_gate(this.__wbg_ptr, ptr0, len0, args, acquire, release);
74 return ret;
75 }
76 /**

Callers 1

__wbg_get_importsFunction · 0.85

Calls 3

stringifyMethod · 0.80
execMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected