Hethers
  • Documentation
  • Getting Started
  • Application Programming Interface
    • Providers
      • Provider
        • Accounts Methods
        • Logs Methods
        • Network Status Methods
        • Transactions Methods
        • Event Emitter Methods
        • Base Provider
        • HederaProvider
      • Types
    • Contract Interaction
      • Contract
      • ContractFactory
      • Example: ERC-20 Contract
    • Utilities
      • Accounts
      • Addresses
      • Application Binary Interface
        • AbiCoder
        • ABI Formats
        • Fragments
        • Interface
      • BigNumber
      • Byte Manipulation
      • Constants
      • Display Logic and Input
      • Encoding Utilities
      • FixedNumber
      • Hashing Algorithms
      • HD Wallet
      • Logging
      • Property Utilities
      • Signing Key
      • Strings
      • Transactions
      • Web Utilities
      • Wordlists
    • Signers
  • Contributing
  • Other Resources
Powered by GitBook
On this page
  1. Application Programming Interface
  2. Utilities

Property Utilities

PreviousLoggingNextSigning Key

Last updated 3 years ago

This is a collection of utility functions used for handling properties in a platform-safe way.

hethers.utils.checkProperties( object , check ) ⇒ void

Checks that object only contains properties included in check, and throws if not.

hethers.utils.deepCopy( anObject ) ⇒ any

Creates a recursive copy of anObject. Frozen (i.e. and other known immutable) objects are copied by reference.

hethers.utils.defineReadOnly( anObject , name , value ) ⇒ void

Uses the Object.defineProperty method to set a read-only property on an object.

hethers.utils.getStatic( aConstructor , key ) ⇒ any

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.

hethers.utils.resolveProperties( anObject ) ⇒ Promise<any>

Retruns a Promise which resolves all child values on anObject.

hethers.utils.shallowCopy( anObject ) ⇒ any

Returns a shallow copy of anObject. This is the same as using Object.assign({ }, anObject).

INVALID_ARGUMENT