Methods
-
inner whereAmI() → {whereAmI_result}
-
Provide a standard json object response that indicates to the caller the nature of the environment on which it is running
This can be required or imported and the result is a plain javascript object.
See Examples for the JSON objects returned.
Returns:
whereAmI_result
Type Definitions
-
whereAmI_result
-
The structure of the object returned by this module.
In the event that any of these properties cannot be determined, they will contain the value
unknownPlease feed back to us additional environments or values we might also detect
Properties:
Name Type Description _genresRegExp a regular expression that returns true when testing against a string that contains any one of the possible values of
genregenreNCName the genre or general category of processor engine of the environment on which the code is running. This version will contain one of the following
["unknown", "server", "browser", "script"]engineNCName the engine that is running the code at the moment. This may contain various values as reported by the engine about itself. Some values include
["unknown", "node", "Firefox", "Edg", "Chrome", "Trident","WScript", "aspClassic"]versionString the version of the engine in the format that is used by that engine
osNCName the name of the operating system coerced to lower case. Some values include
["unknown", "linux", "sunos", "openbsd", "freebsd", "darwin", "aix", "win16", "win32", "win64"].
Important - nodejs reportswin32even when on a 64 bit machine with 64 bit os. The value responded here is the true version of the operating system so on node on a 64 window machine AND with 64 bit os you get win64 just as you would on a windows script running on the same machinecomputerNameString the name of the computer on which your code is running. This is not discoverable in all environments