is-video

Check if a filepath is a video file

Usage no npm install needed!

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

README

is-video Build Status

Check if a filepath is a video file

Install

$ npm install --save is-video

Usage

var isVideo = require('is-video');

isVideo('src/unicorn.mp4');
//=> true

isVideo('src/unicorn.txt');
//=> false

Related

License

MIT © Sindre Sorhus