Endo API documentation - v0.2.0 / Exports / @endo/common / object-meta-assign
Module: object-meta-assign
Table of contents
Functions
Functions
objectMetaAssign
▸ objectMetaAssign(target
, ...originals
): any
Like Object.assign
but at the reflective level of property descriptors rather than property values.
Unlike Object.assign
, this includes all own properties, whether enumerable or not. An original accessor property is copied by sharing its getter and setter, rather than calling the getter to obtain a value. If an original property is non-configurable, a property of the same name on a later original that would conflict instead causes the call to objectMetaAssign
to throw an error.
Returns the enhanced target
after hardening.
Parameters
Name | Type |
---|---|
target | any |
...originals | any [] |
Returns
any