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.4.0 to 1.4.1

2

package.json
{
"name": "classenv",
"version": "1.4.0",
"version": "1.4.1",
"description": "Describe your environment variables contract with TypeScript class decorator",

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

@@ -26,3 +26,2 @@ # TypeScript environment variable decorator

class ServerSettings {
// Field name will be auto-converted to POSTGRES_URL for checking the process.env
@Env('PORT')

@@ -47,3 +46,3 @@ portNumber!: number; // 3000

@Env()
postgresUrl!: string; // postgres://127.0.0.1:5432
postgresUrl!: string; // "postgres://127.0.0.1:5432"
}

@@ -57,3 +56,3 @@ ```

@Env()
port: number = 3000;
port: number = 3000; // 3000
}

@@ -86,3 +85,3 @@ ```

### 🔘 Pick one of the name from array
### 🔘 Pick one of the names from array

@@ -94,3 +93,3 @@ ```ts

@Env(['POSTGRESQL_URI', 'PG_URL', 'POSTGRES_URL'])
url!: string; // postgres://127.0.0.1:5432
url!: string; // "postgres://127.0.0.1:5432"
}

@@ -106,3 +105,3 @@ ```

@Env()
static port: number = 3000;
static port: number; // "3000"
}

@@ -109,0 +108,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