deno-dotenv
deno-dotenv copied to clipboard
Async version of "config()"
In other words, to use readFile()
instead of readFileSync()
…
That will make the whole thing async of course…
So maybe make two versions config()
and configSync()
@pasha-bolokhov For now someone kindly implemented configAsync
. It's been released with v3.1.0.
Obviously eventually it would be good to migrate this to config
and rename the existing config
to configSync
.
I'll reopen this ticket to gauge interest on fixing the naming.
I just totally missed your idea
Yes, I should do that — totally agree with you about the renaming.
Although, it would be a breaking change… — is it still ok to proceed?
I've re–factored the code among config()
and configAsync()
in the recent PR, to avoid duplication of code, so perhaps I should wait until (and if) that branch is merged…
Just for reference this is how to official dotenv from deno std works
https://github.com/pietvanzoen/deno-dotenv#-dotenv-is-now-a-part-of-deno_std-