@hyperfrontend/immutable-api-utils/built-in-copy/reflect

reflect

Locked, prototype-pollution-resistant copies of the global Reflect methods.

References to Reflect.apply, Reflect.construct, Reflect.get, Reflect.set, Reflect.has, Reflect.ownKeys, and the rest of the Reflect API are captured at module-load time and frozen into a tamper-proof namespace, so meta-programming stays trustworthy even if the global Reflect is later patched. Effective only when imported before any untrusted code has had a chance to mutate the prototype chain.

API Reference

Variables

§type

apply

(Safe copy) Calls the function with the specified object as the this value and the elements of specified array as the arguments.
§type

construct

(Safe copy) Constructs the target with the elements of specified array as the arguments.
§type

defineProperty

(Safe copy) Adds or modifies a property on an object.
§type

deleteProperty

(Safe copy) Deletes a property from an object.
§type

get

(Safe copy) Gets the property of target, equivalent to target[propertyKey].
§type

getOwnPropertyDescriptor

(Safe copy) Gets the property descriptor of the specified property.
§type

getPrototypeOf

(Safe copy) Returns the prototype of the specified object.
§type

has

(Safe copy) Determines whether an object has a property with the specified name.
§type

isExtensible

(Safe copy) Returns a boolean indicating whether the object is extensible.
§type

ownKeys

(Safe copy) Returns an array of the target object's own property keys.
§type

preventExtensions

(Safe copy) Prevents new properties from being added to the object.
§type

Reflect

(Safe copy) Namespace object containing all Reflect methods. Note: Importing this imports all methods in this namespace (no tree-shaking).
§type

set

(Safe copy) Sets the property of target, equivalent to target[propertyKey] = value.
§type

setPrototypeOf

(Safe copy) Sets the prototype of the specified object.