[!!!] The source code of this package is on https://github.com/docomodigital/js-utils, this repository will be removed asap
Allow to get the current user agent on your device.
import { JsPlatform } from 'js-platform';
// create a JsPlatform new instance
const Platform = new JsPlatform();
// Get the current user agent
// Print: "Hello, I'm a ios/android/desktop device!"
console.log("Hello, I'm a " + Platform.OS + " device!");
npm install --save @docomodigital/js-platform
To read documentation, go to:
http://docomodigital.github.io/js-platform/latest
or run the following command insite the js-platform folder:
npm run doc:open