Files
scriptc/tests/corpus/js-normalize-dispatch.js
Chris Tate a07998f667 Expand static three.js workflows and host integration (#621)
* Expand static three.js workflows and host integration

* Preserve JavaScript class state in static three.js workflows

* Preserve inferred JavaScript behavior across static workflows

* Preserve inferred callables and native compatibility boundaries

* Retain annotated JavaScript factory exports and bootstrap-safe call spreads

* Preserve Buffer and child callback identities in static packages

* Clarify JavaScript symbol spread support
2026-10-02 19:56:34 -05:00

17 lines
809 B
JavaScript

function normalized(value) { return value.normalize(); }
function explicit(value) { return value.normalize(undefined); }
function decomposed(value) { return value.normalize("NFD"); }
const object = { normalize(...args) { return `${this === object}:${args.length}:${args[0]}`; } };
console.log(normalized(object), explicit(object), decomposed(object));
class Vector {
normalize(...args) { return `${this instanceof Vector}:${args.length}:${args[0]}`; }
}
const vector = new Vector();
console.log(normalized(vector), explicit(vector), decomposed(vector));
console.log(normalized("e\u0301"), explicit("e\u0301"), decomposed("é"));
class Holder {
constructor(value) { this.value = value; }
}
const held = new Holder(vector);
console.log(normalized(held.value), explicit(held.value), decomposed(held.value));