Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ console.log(getenv('RANDOM'));

## Changelog

### v2.0.0

- Allow any case for True/False boolean strings `env.bool()` (#22)

### v1.1.0

- Add separator option to `env.array()` (#19)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Tim Ruffles <timruffles@gmail.com>",
"Ashwani Agarwal <ashwani.a@outlook.com>"
],
"version": "1.0.0",
"version": "2.0.0",
"license": "MIT",
"homepage": "https://github.com/ctavan/node-getenv",
"repository": {
Expand Down
10 changes: 10 additions & 0 deletions test/getenv.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ process.env.TEST_GETENV_FLOAT2 = '0.0';
process.env.TEST_GETENV_INFINITY1 = Infinity;
process.env.TEST_GETENV_INFINITY2 = -Infinity;
process.env.TEST_GETENV_FALSE = 'false';
process.env.TEST_GETENV_FALSE1 = 'False';
process.env.TEST_GETENV_FALSE2 = 'FALSE';
process.env.TEST_GETENV_TRUE = 'true';
process.env.TEST_GETENV_TRUE1 = 'True';
process.env.TEST_GETENV_TRUE2 = 'TRUE';
process.env.TEST_GETENV_NOT_REALLY_TRUE = '1';
process.env.TEST_GETENV_NOT_REALLY_FALSE = '0';
Expand Down Expand Up @@ -204,6 +206,10 @@ tests['getenv.bool() valid input'] = function () {
varName: 'TEST_GETENV_FALSE',
expected: false,
},
{
varName: 'TEST_GETENV_FALSE1',
expected: false,
},
{
varName: 'TEST_GETENV_FALSE2',
expected: false,
Expand All @@ -212,6 +218,10 @@ tests['getenv.bool() valid input'] = function () {
varName: 'TEST_GETENV_TRUE',
expected: true,
},
{
varName: 'TEST_GETENV_TRUE1',
expected: true,
},
{
varName: 'TEST_GETENV_TRUE2',
expected: true,
Expand Down