Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
MrXyfir committed Mar 17, 2019
1 parent 65347e9 commit 962b819
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Copies the string values in `process.env` and parses each with `JSON.parse()` to

That's it.

Used by [Ptorx](https://ptorx.com) and other [Xyfir](https://www.xyfir.com) projects.

# Usage

Let's assume you have an `.env` file with the following data:
Expand Down Expand Up @@ -56,13 +58,14 @@ import 'enve';
declare global {
namespace NodeJS {
interface Process {
enve: { foo: string; bar: boolean };
enve: {
foo: string;
bar: boolean;
baz: {
qux: number;
};
};
}
}
}

// Type 'true' is not assignable to type 'string'. ts(2322)
process.env.foo = true;
// Type 'string' is not assignable to type 'boolean'. ts(2322)
process.env.bar = 'baz';
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enve",
"version": "1.0.0",
"version": "1.0.1",
"description": "JSON-parsed environment variables",
"main": "enve.js",
"author": "Xyfir, LLC <[email protected]> (https://www.xyfir.com)",
Expand Down

0 comments on commit 962b819

Please sign in to comment.