2020-06-09 23:56:58 -04:00
-----
2020-07-03 01:54:56 -04:00
Documentation: [html ](https://docs.ethers.io/ )
2020-06-09 23:56:58 -04:00
-----
Property Utilities
==================
2021-02-08 15:26:10 -05:00
#### *ethers* . *utils* . **checkProperties**( object , check ) => *void*
2020-06-09 23:56:58 -04:00
2021-02-08 15:26:10 -05:00
Checks that *object* only contains properties included in *check* , and throws [INVALID_ARGUMENT ](/v5/api/utils/logger/#errors--invalid-argument ) if not.
2020-06-09 23:56:58 -04:00
#### *ethers* . *utils* . **deepCopy**( anObject ) => *any*
2021-02-08 15:26:10 -05:00
Creates a recursive copy of *anObject* . Frozen (i.e. and other known immutable) objects are copied by reference.
2020-06-09 23:56:58 -04:00
#### *ethers* . *utils* . **defineReadOnly**( anObject , name , value ) => *void*
2021-02-08 15:26:10 -05:00
Uses the `Object.defineProperty` method to set a read-only property on an object.
2020-06-09 23:56:58 -04:00
#### *ethers* . *utils* . **getStatic**( aConstructor , key ) => *any*
2021-02-08 15:26:10 -05:00
Recursively check for a static method *key* on an inheritance chain from *aConstructor* to all ancestors.
This is used to mimic behaviour in other languages where `this` in a static method will also search ancestors.
2020-06-09 23:56:58 -04:00
#### *ethers* . *utils* . **resolveProperties**( anObject ) => *Promise< any >*
2021-02-08 15:26:10 -05:00
Retruns a Promise which resolves all child values on *anObject* .
2020-06-09 23:56:58 -04:00
#### *ethers* . *utils* . **shallowCopy**( anObject ) => *any*
2021-02-08 15:26:10 -05:00
Returns a shallow copy of *anObject* . This is the same as using `Object.assign({ }, anObject)` .
2020-06-09 23:56:58 -04:00