Comparing version 1.0.0-1 to 1.0.0
{ | ||
"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 @@ ``` |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
87179
1
177