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

env-create

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-create - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

package.json
{
"name": "env-create",
"version": "1.1.0",
"version": "1.1.1",
"description": "Read in a .env.json file that contains valid JSON and assign top level properties to environment variables",

@@ -45,2 +45,2 @@ "repository": {

"dependencies": {}
}
}

@@ -41,3 +41,3 @@ # env-create

The `load()` method will create a process environment variable for every top level object in the the default `.env.json` file located at the root of your project. The `load()` method optionally takes a JSON object with properties for `path, debug,` and `encoding`. All three properties are optional.
The `load()` method will create a process environment variable for every top level object in the the default `.env.json` file located at the root of your project. The `load()` method optionally takes a JSON object with properties for `path`, and `encoding`. Both properties are optional. The function returns an array of messages. If an environment variable already existed and would have been overwritten there were will be a message letting you know that.

@@ -49,3 +49,5 @@ ## Option usage

```javascript
require('env-create').load({path: "../ENV_VARS/gsweet.env.json", encode: "utf8", debug: "true"});)
require('env-create').load({
path: "../ENV_VARS/gsweet.env.json",
encode: "utf8"))
const firstSecret = JSON.parse(process.env.secret1);

@@ -58,3 +60,5 @@ const secondSecret = JSON.parse(process.env.secret2);

```javascript
require('env-create').load({path: "/User/yourUserName/ENV_VARS/gsweet.env.json", encode: "utf8", debug: "true"});)
const result = require('env-create').load({
path: "/User/yourUserName/ENV_VARS/gsweet.env.json",
encode: "utf8"))
```

@@ -61,0 +65,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