steal.isPlatform

  • property
{function()}  

Determines the platform Steal is running in, as specified by env.

steal.isPlatform(platformName)

Parameters

  1. platformName {String}

    The name of the platform to test.

Returns

{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 env. Steal will set it to either window or worker and other plugins can set it themselves.