@alwatr/platform-info
Version:
This module provides a way to detect the current platform where the script is running. It defines a constant `platformInfo` which holds the information about the current platform.
44 lines • 1.12 kB
TypeScript
/**
* Represents information about the current platform.
*/
interface PlatformInfo {
/**
* Whether the NODE_ENV environment variable is not `production` or in browser location.hostname is `localhost`.
*/
readonly development: boolean;
/**
* Whether the current platform is node.js.
*/
readonly isNode: boolean;
/**
* Whether the current platform is a browser.
*/
readonly isBrowser: boolean;
/**
* Whether the current platform is a not a browser.
*/
readonly isCli: boolean;
/**
* Whether the current platform is a web worker.
*/
readonly isWebWorker: boolean;
/**
* Whether the current platform is deno.
*/
readonly isDeno: boolean;
/**
* Whether the current platform is bun.
*/
readonly isBun: boolean;
/**
* Whether the current platform is nw.js.
*/
readonly isNw: boolean;
/**
* Whether the current platform is electron.
*/
readonly isElectron: boolean;
}
export declare const platformInfo: PlatformInfo;
export {};
//# sourceMappingURL=main.d.ts.map