How to use the video-extensions.concat 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 goto-bus-stop / get-artist-title / lib / plugins / remove-file-extension.js View on Github external
var videoExtensions = require('video-extensions')
var audioExtensions = require('audio-extensions')

var fileExtensions = videoExtensions.concat(audioExtensions)
var fileExtensionRx = new RegExp('\\.(' + fileExtensions.join('|') + ')$', 'i')
function removeFileExtension (title) {
  return title.replace(fileExtensionRx, '')
}

exports.before = removeFileExtension

video-extensions

List of video file extensions

MIT
Latest version published 6 months ago

Package Health Score

64 / 100
Full package analysis