Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

env-var

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-var - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

2

CHANGELOG.md

@@ -0,1 +1,3 @@

## 6.0.3 (03/03/20)
* Fix typings to support `required()`, `convertFromBase64()`, etc. with `ExtensionFn`.

@@ -2,0 +4,0 @@ ## 6.0.2 (29/02/20)

24

env-var.d.ts

@@ -6,7 +6,7 @@

interface IPresentVariable {
interface IPresentVariable<Extensions> {
/**
* Converts a bas64 environment variable to ut8
*/
convertFromBase64: () => IPresentVariable
convertFromBase64: () => IPresentVariable<Extensions> & Extensions

@@ -17,3 +17,3 @@ /**

*/
example: (example: string) => IPresentVariable
example: (example: string) => IPresentVariable<Extensions> & Extensions

@@ -24,3 +24,3 @@ /**

*/
default: (value: string|number|Record<string, any>|Array<any>) => IPresentVariable;
default: (value: string|number|Record<string, any>|Array<any>) => IPresentVariable<Extensions> & Extensions;

@@ -31,3 +31,3 @@ /**

*/
required: (isRequired?: boolean) => IPresentVariable;
required: (isRequired?: boolean) => IPresentVariable<Extensions> & Extensions;

@@ -127,7 +127,7 @@ /**

interface IOptionalVariable {
interface IOptionalVariable<Extensions> {
/**
* Decodes a base64-encoded environment variable
*/
convertFromBase64: () => IOptionalVariable;
convertFromBase64: () => IOptionalVariable<Extensions> & Extensions;

@@ -138,3 +138,3 @@ /**

*/
example: (value: string) => IOptionalVariable;
example: (value: string) => IOptionalVariable<Extensions> & Extensions;

@@ -145,3 +145,3 @@ /**

*/
default: (value: string|number|Record<string, any>|Array<any>) => IPresentVariable;
default: (value: string|number|Record<string, any>|Array<any>) => IPresentVariable<Extensions> & Extensions;

@@ -152,3 +152,3 @@ /**

*/
required: (isRequired?: boolean) => IPresentVariable;
required: (isRequired?: boolean) => IPresentVariable<Extensions> & Extensions;

@@ -286,4 +286,4 @@ /**

export function from<T extends Extensions, K extends keyof T>(values: NodeJS.ProcessEnv, extensions?: T): IEnv<
IPresentVariable & Record<K, (...args: any[]) => ReturnType<T[K]>>,
IOptionalVariable & Record<K, (...args: any[]) => ReturnType<T[K]>|undefined>
IPresentVariable<Record<K, (...args: any[]) => ReturnType<T[K]>>> & Record<K, (...args: any[]) => ReturnType<T[K]>>,
IOptionalVariable<Record<K, (...args: any[]) => ReturnType<T[K]>|undefined>> & Record<K, (...args: any[]) => ReturnType<T[K]>|undefined>
>;
{
"name": "env-var",
"version": "6.0.2",
"version": "6.0.3",
"description": "Verification, sanatization, and type coercion for environment variables in Node.js",

@@ -9,3 +9,3 @@ "main": "env-var.js",

"coveralls": "npm run coverage && cat coverage/lcov.info | coveralls",
"coverage": "nyc mocha test/ && nyc report --reporter=lcov",
"coverage": "nyc mocha test/index.js && nyc report --reporter=lcov",
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",

@@ -15,3 +15,3 @@ "unit": "mocha test/",

"test": "npm run unit && npm run coverage && npm run check-coverage && npm run lint && npm run ts-verify",
"ts-verify": "tsc && node test/types/index.js"
"ts-verify": "tsc && mocha test/types/*.js"
},

@@ -56,2 +56,4 @@ "husky": {

"devDependencies": {
"@types/chai": "^4.2.10",
"@types/mocha": "^7.0.1",
"@types/node": "~13.7.0",

@@ -58,0 +60,0 @@ "bluebird": "~3.7.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