How to use the hostname function from osenv
Find comprehensive JavaScript osenv.hostname code examples handpicked from public code repositorys.
GitHub: Mondego/pyreco
11 12 13 14 15 16 17 18 19 20
// Some things are not reliably in the env, and have a fallback command: var h = osenv.hostname(function (er, hostname) { h = hostname }) // This will still cause it to be memoized, so calling osenv.hostname() // is now an immediate operation. // You can always send a cb, which will get called in the nextTick // if it's been memoized, or wait for the fallback data if it wasn't
19
22
13
+ 5 other calls in file
osenv.home is the most popular function in osenv (163 examples)