htmlemmurt 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/wasm/node/emmurt_wasm.js
CHANGED
|
@@ -20,6 +20,25 @@ function compile(source, filename, read, inline) {
|
|
|
20
20
|
}
|
|
21
21
|
exports.compile = compile;
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The formatted page, or undefined when it cannot be formatted: then
|
|
25
|
+
* `compile` says why.
|
|
26
|
+
* @param {string} source
|
|
27
|
+
* @returns {string | undefined}
|
|
28
|
+
*/
|
|
29
|
+
function format(source) {
|
|
30
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
31
|
+
const len0 = WASM_VECTOR_LEN;
|
|
32
|
+
const ret = wasm.format(ptr0, len0);
|
|
33
|
+
let v2;
|
|
34
|
+
if (ret[0] !== 0) {
|
|
35
|
+
v2 = getStringFromWasm0(ret[0], ret[1]);
|
|
36
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
37
|
+
}
|
|
38
|
+
return v2;
|
|
39
|
+
}
|
|
40
|
+
exports.format = format;
|
|
41
|
+
|
|
23
42
|
/**
|
|
24
43
|
* A JavaScript runtime error in Neapolitan, as FratmScript says it.
|
|
25
44
|
* @param {string} name
|
|
Binary file
|
package/wasm/web/emmurt_wasm.js
CHANGED
|
@@ -19,6 +19,24 @@ export function compile(source, filename, read, inline) {
|
|
|
19
19
|
return ret;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The formatted page, or undefined when it cannot be formatted: then
|
|
24
|
+
* `compile` says why.
|
|
25
|
+
* @param {string} source
|
|
26
|
+
* @returns {string | undefined}
|
|
27
|
+
*/
|
|
28
|
+
export function format(source) {
|
|
29
|
+
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
30
|
+
const len0 = WASM_VECTOR_LEN;
|
|
31
|
+
const ret = wasm.format(ptr0, len0);
|
|
32
|
+
let v2;
|
|
33
|
+
if (ret[0] !== 0) {
|
|
34
|
+
v2 = getStringFromWasm0(ret[0], ret[1]);
|
|
35
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
36
|
+
}
|
|
37
|
+
return v2;
|
|
38
|
+
}
|
|
39
|
+
|
|
22
40
|
/**
|
|
23
41
|
* A JavaScript runtime error in Neapolitan, as FratmScript says it.
|
|
24
42
|
* @param {string} name
|
|
Binary file
|