env-var icon indicating copy to clipboard operation
env-var copied to clipboard

Deno Support

Open abdulrahman1s opened this issue 2 years ago • 3 comments

It would be cool if we could use this library in Deno. :smile:

abdulrahman1s avatar May 11 '22 14:05 abdulrahman1s

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?

evanshortiss avatar May 11 '22 16:05 evanshortiss

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 avatar May 12 '22 02:05 abdulrahman1s

@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

evanshortiss avatar Dec 25 '22 04:12 evanshortiss