UNPKG
dotenv
Version:
latest (17.4.2)
17.4.2
17.4.1
17.4.0
17.3.1
17.3.0
17.2.4
17.2.3
17.2.2
17.2.1
17.2.0
17.1.0
17.0.1
17.0.0
16.6.1
16.6.0
16.5.0
16.4.7
16.4.6
16.4.5
16.4.4
16.4.3
16.4.2
16.4.1
16.4.0
16.3.2
16.3.1
16.3.0
16.2.0
16.1.4
16.1.3
16.1.2
16.1.1
16.1.0
16.1.0-rc2
16.1.0-rc1
16.0.3
16.0.2
16.0.1
16.0.0
15.0.1
15.0.0
14.3.2
14.3.1
14.3.0
14.2.0
14.1.1
14.1.0
14.0.1
14.0.0
13.0.1
13.0.0
12.0.4
12.0.3
12.0.2
12.0.1
12.0.0
11.0.0
10.0.0
9.0.2
9.0.1
9.0.0
8.6.0
8.5.1
8.5.0
8.4.0
8.3.0
8.2.0
8.1.0
8.0.0
7.0.0
6.2.0
6.2.0-rc1
6.2.0-0
6.1.0
6.0.0
5.0.1
5.0.0
4.0.0
3.0.0
2.0.0
1.2.0
1.1.0
1.0.0
0.5.1
0.5.0
0.4.0
0.3.0
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.2
0.1.1
0.1.0
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Loads environment variables from .env file
github.com/motdotla/dotenv
motdotla/dotenv
dotenv
/
lib
/
cli-options.js
12 lines
(10 loc)
•
289 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
re =
/^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/
module
.
exports
=
function
optionMatcher
(
args
) {
return
args.
reduce
(
function
(
acc, cur
) {
const
matches = cur.
match
(re)
if
(matches) { acc[matches[
1
]] = matches[
2
] }
return
acc }, {}) }