mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
- Emit callable Wasm reactors with explicit exports, host callbacks, and independent instance memory. - Compile three.js scene and geometry workloads into Wasm without an embedded JavaScript engine. - Document initialization, memory ownership, and external browser hosting.
14 lines
430 B
JavaScript
14 lines
430 B
JavaScript
/** @returns {number} */
|
|
export function dispatch() {
|
|
return consume(1, 2, 3);
|
|
}
|
|
|
|
function consume(...values) {
|
|
const first = values.shift();
|
|
values.push(4);
|
|
const object = JSON.parse('{}');
|
|
Object.defineProperties(object, { score: { value: 5, enumerable: true } });
|
|
const add = (left, right) => left + right;
|
|
return Number(first) + values.join("").length + Number(object.score) + Number(add.apply(null, [6, 7]));
|
|
}
|