🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

classenv

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classenv - npm Package Compare versions

Comparing version

to
1.2.2

2

package.json
{
"name": "classenv",
"version": "1.2.1",
"version": "1.2.2",
"description": "Describe your environment variables contract with TypeScript class",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# classenv
A perfect typescript environment variables library.
A perfect typescript class environment variables library.

@@ -12,4 +12,2 @@ - Strongly-typed declarative class containing your environment data

Built-in support for type-casting.
**.env**

@@ -24,2 +22,8 @@ ```

class Environment {
@Env() // Auto UPPER_SNAKE_CASE conversion supported
static isSomethingEnabled: number;
@Env() // Won't throw, because got default value
static withDefault: string = 'yeah its me'
@Env('IS_SOMETHING_ENABLED')

@@ -33,8 +37,2 @@ static isEnabledStr: string;

static isEnabledBln: boolean;
@Env() // Auto UPPER_SNAKE_CASE conversion supported
static isSomethingEnabled: number;
@Env() // Won't throw, because got default value
static withDefault: string = 'yeah its me'
}

@@ -41,0 +39,0 @@