Class: Platform

Platform()

Utility class for platform specifics.

Constructor

new Platform()

Source:

Methods

(async, static) getAbsolutePath(path, modulePath) → {Promise.<string>}

Get the absolute path to a js module ie: getAbsolutePath("file.js", import.meta.url);
Parameters:
Name Type Description
path The path
modulePath The module path, ie: import.meta.url
Source:
Returns:
The absolute path
Type
Promise.<string>

(static) getOS() → {OSType}

Returns the running operating system.
Source:
Returns:
The operating system
Type
OSType

(static) getPlatform() → {PlatformType}

Returns the running platform.
Source:
Returns:
The current version
Type
PlatformType

(async, static) require() → {any}

Imports CommonJS node libraries. Do not use in the browser.
Source:
Returns:
The module export
Type
any