Files
scriptc/tests/corpus/6832-node-island-objects/lib.cjs
T
Malte UblandClaude Opus 5.5 106eccd4fd Pass native closures, promises and objects into Node islands by reference (NI-5)
Node islands stack, part 3 of 11 (scriptc-perf/results/islands-prs/PLAN.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:49:52 -07:00

22 lines
596 B
JavaScript

"use strict";
const kept = [];
function describe(o) {
return Object.keys(o).map((k) => `${k}=${o[k]}`).join(" ");
}
function bump(o, by) {
o.count += by;
o.label = `${o.label}+`;
return o.count;
}
function keep(o) { kept.push(o); return kept.length; }
function keptAt(i) { return kept[i]; }
function same(a, b) { return a === b; }
function has(o, k) { return k in o; }
function readThrough(o) { return `${o.greeting}, island (${Object.keys(o).join(",")})`; }
function store(o) { return { inner: o }; }
module.exports = { describe, bump, keep, keptAt, same, has, readThrough, store };