mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-03 07:54:40 +08:00
Under Node.js, publish() deep-freezes everything it reaches, so Object.isFrozen and Object.isSealed return true and Object.isExtensible returns false for a published object, array, Map or Set. Native builds already refused writes into published values, but answered these queries as for an unpublished value: publication marks an object immortal and sets no frozen bit. - record.isFrozen, array.isFrozen and the extensibility test of Maps and Sets also read an immortal rc word as published, the test of the published write guards, for the types the program may publish (PublishedTypes). Other types emit the code they did. - scr_dyn_is_frozen, scr_dyn_is_sealed and scr_dyn_is_extensible answer for a published object, array, Map or Set, or a checked view of one, before materializing the view.