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

dotenv-mono

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-mono - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

35

dist/index.d.ts

@@ -88,2 +88,14 @@ /// <reference types="node" />

private _nodeEnv;
/**
* Constructor.
* @param cwd - Current Working Directory
* @param debug - Turn on/off debugging
* @param depth - Max walking up depth
* @param encoding - File encoding
* @param expand - Turn on/off dotenv-expand plugin
* @param extension - Add dotenv extension
* @param override - Override process variables
* @param path - Dotenv path
* @param priorities - Priorities
*/
constructor({ cwd, debug, depth, encoding, expand, extension, override, path, priorities, }?: DotenvArgs);

@@ -113,2 +125,3 @@ get debug(): boolean | undefined;

* @param loadOnProcess - load contents inside process
* @returns current instance
*/

@@ -118,2 +131,3 @@ load(loadOnProcess?: boolean): this;

* Loads `.env` file contents.
* @returns current instance
*/

@@ -123,3 +137,3 @@ loadFile(): this;

* Find first `.env` file walking up from cwd directory based on priority criteria.
* @return file matched with higher priority
* @returns file matched with higher priority
*/

@@ -130,2 +144,3 @@ find(): string | undefined;

* @param changes - data to change on the dotenv
* @returns current instance
*/

@@ -136,3 +151,3 @@ save(changes: DotenvData): this;

* @param string - string to escape
* @return escaped string
* @returns escaped string
*/

@@ -143,20 +158,20 @@ private escapeRegExp;

* Load dotenv on process and return instance of Dotenv
* @param DotenvArgs props
* @return Dotenv
* @param props - Configuration
* @returns Dotenv instance
*/
export declare function dotenvLoad(): Dotenv;
export declare function dotenvLoad(props: DotenvArgs): Dotenv;
/**
* @see dotenvLoad
*/
export declare const load: typeof dotenvLoad;
export declare const load: (props: DotenvArgs) => Dotenv;
/**
* Load dotenv on process and return the dotenv output
* @param DotenvArgs props
* @return Dotenv
* @param props - Configuration
* @returns DotenvConfigOutput
*/
export declare function dotenvConfig(): DotenvConfigOutput;
export declare function dotenvConfig(props: DotenvArgs): DotenvConfigOutput;
/**
* @see dotenvConfig
*/
export declare const config: typeof dotenvConfig;
export declare const config: (props: DotenvArgs) => DotenvConfigOutput;
//# sourceMappingURL=index.d.ts.map

@@ -15,2 +15,14 @@ "use strict";

class Dotenv {
/**
* Constructor.
* @param cwd - Current Working Directory
* @param debug - Turn on/off debugging
* @param depth - Max walking up depth
* @param encoding - File encoding
* @param expand - Turn on/off dotenv-expand plugin
* @param extension - Add dotenv extension
* @param override - Override process variables
* @param path - Dotenv path
* @param priorities - Priorities
*/
constructor({ cwd, debug, depth, encoding, expand, extension, override, path, priorities, } = {}) {

@@ -107,2 +119,3 @@ this.env = {};

* @param loadOnProcess - load contents inside process
* @returns current instance
*/

@@ -131,2 +144,3 @@ load(loadOnProcess = true) {

* Loads `.env` file contents.
* @returns current instance
*/

@@ -139,3 +153,3 @@ loadFile() {

* Find first `.env` file walking up from cwd directory based on priority criteria.
* @return file matched with higher priority
* @returns file matched with higher priority
*/

@@ -183,2 +197,3 @@ find() {

* @param changes - data to change on the dotenv
* @returns current instance
*/

@@ -242,3 +257,3 @@ save(changes) {

* @param string - string to escape
* @return escaped string
* @returns escaped string
*/

@@ -252,7 +267,7 @@ escapeRegExp(string) {

* Load dotenv on process and return instance of Dotenv
* @param DotenvArgs props
* @return Dotenv
* @param props - Configuration
* @returns Dotenv instance
*/
function dotenvLoad() {
const dotenv = new Dotenv(...arguments);
function dotenvLoad(props) {
const dotenv = new Dotenv(props);
return dotenv.load();

@@ -267,7 +282,7 @@ }

* Load dotenv on process and return the dotenv output
* @param DotenvArgs props
* @return Dotenv
* @param props - Configuration
* @returns DotenvConfigOutput
*/
function dotenvConfig() {
const dotenv = new Dotenv(...arguments);
function dotenvConfig(props) {
const dotenv = new Dotenv(props);
return dotenv.load().config;

@@ -274,0 +289,0 @@ }

{
"name": "dotenv-mono",
"version": "1.1.1",
"version": "1.1.2",
"main": "./dist/index.js",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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