Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.2.1 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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc