src/utils/device.js
function isTablet (mockUserAgent) {
  var userAgent = mockUserAgent || window.navigator.userAgent;
  return /ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(userAgent);
}
function isTablet (mockUserAgent) {
  var userAgent = mockUserAgent || window.navigator.userAgent;
  return /ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(userAgent);
}
function isTablet ( mockUserAgent ) { var userAgent = mockUserAgent || window . navigator . userAgent ; return / ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle / i . test ( userAgent ) ; }
Detect tablet devices.
@param {string} mockUserAgent - Allow passing a mock user agent for testing.
Detect tablet devices .