How do I get an environment variable from Kotlin J...
# javascript
l
How do I get an environment variable from Kotlin JS?
r
Not that I worked with Kotlin/JS for a meaningful time period, but I'll take s shot: try
Copy code
val process = require("process")
val myValue = process.env.MY_VAR
. You should also have something like this somewhere:
external fun require(module: String): dynamic
https://nodejs.org/api/process.html#process_process_env
s
presumably these type of things will appear in MP stdlib one day along with the confirmed IO and Date modules (no more js date hell or moment.js wrapper or whatever the current fad is)
121 Views