steal
Version:
Gets JavaScript.
21 lines (11 loc) • 753 B
Markdown
is running in, as specified by [config.env].
`steal.isPlatform(platformName)`
{String} platformName The name of the platform to test.
{Boolean} Whether this is the platform Steal is running in.
## Use
**steal.isPlatform** is used to determine which environment Steal is running. Because Steal can be run in multiple platforms, such as a browser window, a web worker, on the server, in a Cordova app, steal.isPlatform provides a convenient way to detect these environments.
### Note
The platform has to be set with [config.env]. Steal will set it to either `window` or `worker` and other plugins can set it themselves.
{function} steal.isPlatform
StealJS.functions
Determines the platform Steal