UNPKG

@resk/core

Version:

An innovative TypeScript framework that empowers developers to build applications with a fully decorator-based architecture for efficient resource management. By combining the power of decorators with a resource-oriented design, DecorRes enhances code cla

33 lines (32 loc) 1.01 kB
/** @group Platform * Checks if the current environment is a web environment. * This function checks for the presence of the `window` object and its `document` property, * as well as the `document` object itself, to determine if the environment is a web environment. * @returns {boolean} True if the environment is a web environment, false otherwise. * * @example * ```typescript * if (isWeb()) { * console.log("We're in a web environment!"); * } else { * console.log("We're not in a web environment."); * } * ``` */ declare function isWeb(): boolean; export declare const Platform: { isWeb: typeof isWeb; isLinux: () => boolean; isDarwin: () => boolean; isWin32: () => boolean; isNode: () => boolean; isElectron: () => boolean; isTouchDevice: () => boolean; isServerSide: () => boolean; isClientSide: () => boolean; isMobileBrowser: () => boolean; isAndroidMobileBrowser: () => boolean; isReactNativeWebview: () => boolean; }; export {};