EvoToolkit - v3.7.2 (Changelog)

getEnv

Helper functions allowing you to return info about the users OS and browser.

Source

Contributors

Luke Harrison

Usage

When importing EvoToolkit directly as a compiled .js file without a build step, you can still use these tools through the global EvoToolkit object.

window.evotoolkit.tools.toolName()

getBrowser

For getBrowser(), a list of supported responses are:

  • ie
  • firefox
  • edge
  • safari
  • chrome
  • false (if none of the above)
import getEnv, { getBrowser } from './../../../node_modules/evotoolkit/src/js/tools/getEnv.js';

// Using the methods whilst encapsulated in their parent object
const browser = getEnv.browser();

// If using named import, you can call the function directly
const browser = getBrowser();

getOS

For getOS(), a list of supported responses are:

  • ios
  • false (if none of the above)
import getEnv, { getOS } from './../../../node_modules/evotoolkit/src/js/tools/getEnv.js';

// Using the methods whilst encapsulated in their parent object
const os = getEnv.os();

// If using named import, you can call the function directly
const os = getOS();