Files
scriptc/tests/corpus/3069-set-checked-seed.js
Chris Tate cbb8fc380a Link native FFI libraries and callbacks without a JavaScript engine
- Add exact 64-bit and pointer ABIs, static node:ffi bindings, and Darwin framework linking.
- Support native memory views and reusable callback pools with checked conversions and lifetime handling.
- Preserve the JavaScript values, accessors, and module bindings used during renderer initialization.
2026-09-29 08:07:03 -05:00

13 lines
465 B
JavaScript

function make(values) { return new Set(values); }
const source = JSON.parse('[1,2,2,3]');
const set = make(source);
console.log(set.size, set.has(2), set.has(4));
console.log(make(null).size, make(undefined).size, make('aba').size);
const key = {};
/** @type {unknown[]} */
const entries = JSON.parse('[1,"1"]');
entries.push(key, key, NaN, NaN);
const mixed = make(entries);
console.log(mixed.size, mixed.has(key));
try {make(42);} catch(e) {console.log(e.name);}