DotEnv v1.0.0
In this release, the entire codebase has been completely rewritten, and the old API replaced too.
Old API
load([path = ".env"]; override=false)
: ModifyENV
with the contents ofpath
, optionally overriding existing valuesconfig([path = ".env"]; override=false)
: Alias forload
parse(<source>)
: parse a.env
file to aDict{String, String}
New API
load!([target = ENV], path = ".env"; override=false)
: parse the.env
filepath
and modifytarget
, optionally overriding existing valuesunload!([target = ENV], path = ".env")
: undoes the equivalentload!
config(<source/path>; env, override)
: pure version ofload!
(used in the implementation ofload!
) essentially, returns a combined env dictparse(<source>)
: parse a.env
file to aDict{String, String}
Quick (and dirty) comparison table
Old API | New API |
---|---|
load |
load! |
config |
load! |
unload! |
|
config |
|
parse |
parse |