dotenv-json-complex
Advanced tools
Comparing version
const env = require('./index') | ||
describe('Environment', () => { | ||
test('Should return undefined if env function is not called', () => { | ||
expect(process.env.test).toBe(undefined) | ||
}) | ||
test('Should return undefined if env function is not called', () => { | ||
expect(process.env.test).toBe(undefined) | ||
}) | ||
test('Should return env variables if env function is loaded', () => { | ||
env() | ||
expect(process.env.test).toBe('{"cukinha":"Cuka"}') | ||
}) | ||
test('Should return env variables if env function is loaded', () => { | ||
env() | ||
expect(process.env.my_app_env).toBe('{"nodeEnv":"development","api":{"prefix":"/api"},"database":{"username":"foo","password":"bar","name":"awesome_db_name","host":"my_db_host"}}') | ||
}) | ||
}) |
{ | ||
"name": "dotenv-json-complex", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Load complex enviroment variable via JSON file", | ||
@@ -33,4 +33,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"jest": "^24.9.0" | ||
"jest": "^26.6.3" | ||
} | ||
} |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5169
2.97%1
Infinity%