has-touch

utility that returns whether the browser supports touch events or not

Usage no npm install needed!

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

README

has-touch

Touch support detection module on npm

Install

$ npm install --save has-touch

Usage

var hasTouch = require('has-touch')

hasTouch === true || hasTouch === false