How to use the video-extensions.forEach function in video-extensions

To help you get started, we’ve selected a few video-extensions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / is-video / index.js View on Github external
'use strict';
var path = require('path');
var videoExtensions = require('video-extensions');
var exts = Object.create(null);

videoExtensions.forEach(function (el) {
	exts[el] = true;
});

module.exports = function (filepath) {
	return path.extname(filepath).slice(1).toLowerCase() in exts;
};

video-extensions

List of video file extensions

MIT
Latest version published 6 months ago

Package Health Score

64 / 100
Full package analysis