@mu-ts/configurations
TypeScript icon, indicating that this package has built-in type declarations

3.0.7 • Public • Published

Summary

Convenience around configurations.

Usage

Declare Sources

To return more than just your defaults, you will need to define the sources you want considered during a value lookup. The order or declaration, will determine the order they are queried in.

This example prioritizes secrets manager above all, then environment variables then a hard coded set of default values.

Configurations.store
  .secretManager('store-name', process.env.AWS_REGION)
  .environment()
  .defaults({"foo":"bar"})

Use Values

To get raw values, you can use a simple get operation.

const myConfig: any = await Configurations.get('a-value');

To cast as the values are returned.

const myConfig: string = await Configurations.as.string('a-value');

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.761latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.761
3.0.60
3.0.50
3.0.40
3.0.30
3.0.20
3.0.10
3.0.00
2.3.00
2.2.40
2.2.30
2.2.10
2.2.00
2.1.40
2.1.30
2.1.20
2.1.10
2.1.00
2.0.70
2.0.60
2.0.50
2.0.40
2.0.30
2.0.10
2.0.00
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i @mu-ts/configurations

Weekly Downloads

61

Version

3.0.7

License

ISC

Unpacked Size

63.9 kB

Total Files

26

Last publish

Collaborators

  • matt-filion
  • strandedmusician
  • jeff-authvia