Closed sevir closed 12 years ago
I've changed getnetworkip for multiplatform work using os module and methods getNetworkInterfaces (in Node v0.5.x, deprecated in v0.6.x) and networkInterfaces (renamed in v0.6.x)
I've maintained the old code of compatibility with versions 0.4.x using ifconfig command.
Beautiful! Thank you.
the correct regexp in linux
line 18 - before: filterRE = /\binet\b[^:]+:\s([^\s]+)/g; after: filterRE = /\binet:\s([^\s]+)/g;
Seems that the code is copy of http://stackoverflow.com/a/3742915 , and the author says:
" (tested on MacOS Snow Leopard only; hope it works on linux too) "
;)