New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

envsafe

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

envsafe - npm Package Compare versions

Comparing version 1.0.0-1 to 1.0.0

2

package.json
{
"version": "1.0.0-1",
"version": "1.0.0",
"license": "MIT",

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

@@ -5,2 +5,4 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/c17614f0d80b810e47a6/maintainability)](https://codeclimate.com/github/KATT/envsafe/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/c17614f0d80b810e47a6/test_coverage)](https://codeclimate.com/github/KATT/envsafe/test_coverage)

Validate access to environment variables and parse them to the right type.
```

@@ -19,4 +21,5 @@ ========================================

- Written in 100% TypeScript
- Always strict - only get the props you have defined
- No dependencies - smaller bundle for browser/isomorphic apps
- **Always strict** - only access the variables you have defined
- Built for node.js **and** the browser
- **No dependencies** - tiny bundle for browser/isomorphic apps

@@ -50,3 +53,3 @@ ---

```ts
import { str, envsafe, url } from 'envsafe';
import { str, envsafe, port, url } from 'envsafe';

@@ -56,18 +59,16 @@ export const env = envsafe({

devDefault: 'development',
choices: ['development', 'test', 'production'],
}),
REACT_API_URL: url({
PORT: port({
devDefault: 3000,
}),
API_URL: url({
devDefault: 'https://example.com/graphql',
}),
REACT_APP_AUTH0_CLIENT_ID: str({
AUTH0_CLIENT_ID: str({
devDefault: 'xxxxx',
}),
REACT_APP_AUTH0_DOMAIN: str({
AUTH0_DOMAIN: str({
devDefault: 'xxxxx.auth0.com',
}),
REACT_APP_SEGMENT_ID: str({
devDefault: 'xxxxx',
}),
REACT_APP_BUGSNAG_API_KEY: str({
default: 'xxxxx',
}),
});

@@ -74,0 +75,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