is-touch-device

Is the current JS environment a touch device?

Usage no npm install needed!

<script type="module">
  import isTouchDevice from 'https://cdn.skypack.dev/is-touch-device';
</script>

README

is-touch-device Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

Is the current JS environment a touch device?

Usage

var isTouchDevice = require('is-touch-device');
var assert = require('assert');

assert.equal(typeof isTouchDevice(), 'boolean');