@xylabs/platform
v5.0.87
Published
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Readme
@xylabs/platform
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Reference
@xylabs/platform
Modules
| Module | Description | | ------ | ------ | | index-browser | - | | index-node | - |
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
Part of sdk-js
Maintainers
License
See the LICENSE file for license details
