@rtorcato/js-common / os
os
Functions
getOsPlatform()
getOsPlatform():
string|undefined
Defined in: os/index.ts:11
Returns the current operating system platform (Node.js only).
Example
getOsPlatform() // 'darwin' on macOS, 'win32' on Windows, undefined in a browser
Returns
string | undefined
The platform (e.g., 'darwin', 'win32', 'linux').
getOsRelease()
getOsRelease():
string|undefined
Defined in: os/index.ts:26
Returns the OS release/version (Node.js only).
Example
getOsRelease() // 'node'
Returns
string | undefined
getOsArch()
getOsArch():
string|undefined
Defined in: os/index.ts:42
Returns the OS architecture (Node.js only).
Example
getOsArch() // 'arm64' on Apple silicon, 'x64' on Intel
Returns
string | undefined
getHomeDir()
getHomeDir():
string|undefined
Defined in: os/index.ts:51
Returns the user's home directory (Node.js only).
Returns
string | undefined
getTmpDir()
getTmpDir():
string|undefined
Defined in: os/index.ts:63
Returns the system's temporary directory (Node.js only).
Returns
string | undefined