0.1.5 • Published 2 years ago

@the-open-dao/tod-utils v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

The Open DAO Utils

toDecimals (function)

Converts number to decimals.

Parameters:

  • src (string | number | bigint) - Number to convert.
  • decimals (number) - Number of decimals.

returns: bigint

fromDecimals (function)

Converts decimals to number.

Parameters:

  • src (string | number | bigint) - Number decimals to convert.
  • decimals (number) - Number of decimals.

returns: string

loadConfigWithExpressions (function)

Loads json config, replacing expressions with evaluated values:

  • ENV{{ ENV_NAME }} => process.env.ENV_NAME
  • More coming soon...

Parameters:

  • configPath (fs.PathOrFileDescriptor) - Path to config file.
  • errCallback ((err: any) => void) - Function to be called on error.

returns: any

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago