env-var
env-var copied to clipboard
Deno Support
It would be cool if we could use this library in Deno. :smile:
Deno has been on my list of things to play around with for a while now. I actually had a private repository named "denv-var" where I planned to try create a Deno port of this library. After that I started simply trying to port this library to be pure TypeScript. It was a little tricky due to features such as the custom accessors. Here's the work in progress code.
I'd love help with the TS port if you're interested. I suspect it'd be easier to support Deno once that work is complete, but maybe I'm wrong, and the current lib could support it with minor modifications?
I don't think it'll be hard to even automate the task to support deno.
since the process.env
is exactly like Deno.env.toObject()
I could create PR for you once the typescript version gets merged if you don't mind.
@abdulrahman1s version 8 is getting close to completion. I have published a beta tag on npm. You can try it using npm install env-var@beta
. Code is in the https://github.com/evanshortiss/env-var/tree/typescript-refactor branch