0.1.2 • Published 6 months ago

@raccoons-co/genera v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

npm version Maintainability Rating codecov CircleCI

Genera

Class field decorator @EnvironmentVariable. Depends on TypeScript 5, Stage 3 ECMAScript Decorators and does not requires the opt-in compiler flag called --experimentalDecorators.

export default class AwsEnvironment {

    @EnvironmentVariable.of("AWS_REGION").orElseInitial()
    private readonly awsRegion: string = "us-east-1";

    @EnvironmentVariable.of("AWS_ACCOUNT").orElseThrow()
    private readonly awsAccount: string = "";

    public region(): string {
        return this.awsRegion;
    }

    public account(): string {
        return this.awsAccount;
    }
}

Install:

% npm i @raccoons-co/genera
0.1.0

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago