@xylabs/platform
v5.0.97
Published
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Downloads
27,580
Readme
@xylabs/platform
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Install
Using npm:
npm install {{name}}Using yarn:
yarn add {{name}}Using pnpm:
pnpm add {{name}}Using bun:
bun add {{name}}License
See the LICENSE file for license rights and limitations (LGPL-3.0-only).
Reference
packages
platform
### .temp-typedoc
### index-browser
### functions
### <a id="isBrowser"></a>isBrowserfunction isBrowser(): boolean;Returns whether the current environment is a browser window (not a web worker).
Returns
boolean
### <a id="isNode"></a>isNodefunction isNode(): boolean;Returns whether the current environment is Node.js. Always returns false in the browser entry point.
Returns
boolean
### <a id="isWebworker"></a>isWebworkerfunction isWebworker(): boolean;Returns whether the current environment is a dedicated web worker.
Returns
boolean
### variables
### <a id="subtle"></a>subtleconst subtle: SubtleCrypto;The Web Crypto API's SubtleCrypto interface, sourced from the browser's globalThis.crypto.
### index-node
### functions
### <a id="isBrowser"></a>isBrowserfunction isBrowser(): boolean;Returns whether the current environment is a browser. Always returns false in Node.js.
Returns
boolean
### <a id="isNode"></a>isNodefunction isNode(): boolean;Returns whether the current environment is Node.js. Always returns true in this entry point.
Returns
boolean
### <a id="isWebworker"></a>isWebworkerfunction isWebworker(): boolean;Returns whether the current environment is a web worker. Always returns false in Node.js.
Returns
boolean
