the key to use to access the composed base object.
Optional
mirrorspecify whether or not the given object's prototype methods and properties should also be mimicked/mirrored.
for fine-grained control of which prototypes from the full prototype chain get mimicked, you can provide one of the following configuration objects:
Array<Object>
: a manually assembled array of prototype objects, starting with immediate prototype of obj
, and ending with the last ancestral prototype object.PrototypeChainOfObjectConfig
: a description object for a slice of continuous prototype chain, used by the function prototypeChainOfObject.true
: equivalent to the prototype slice description { start: 0, end: Object.prototype }
.false
: equivalent to the manually assembled prototype chain []
(empty array).Optional
propertyspecify additional property keys that should be mirrored.
this would be needed in situations where not all property keys of the given obj
are immediately discoverable via Object.getOwnPropertyNames
and Object.getOwnPropertySymbols
.
for instance, dynamically assigned property keys, and class-instance bound keys cannot be deduced beforehand.
and so, for such cases, you will need to address those non-discoverable keys in this config option, should you wish for them to be mirrored later on.
Optional
ignorespecify a set of keys that should not be mirrored.
Optional
targetspecify an optional existing target object on which the provided obj
gets mirrored onto.
if none is specified, then a new empty object is used as the target. if a target object is provided, then the same object will be returned by the mirrorObjectThroughComposition function.
configuration options for the function mirrorObjectThroughComposition.