/discovery-types

Check type of files

Primary LanguageTypeScript

discovery-types

Install

$ npm install discovery-types

or

$ yarn add discovery-types

Usage

const discoveryTypes = require('discovery-types');
or
import discoveryTypes from 'discovery-types';
  • isAudio(name): This function verify if file is a audio.
  • isCompressed(name): This function verify if is a compressed file.
  • isDocument(name): This function verify if file is a document.
  • isExecutable(name): This function verify if is a executable file.
  • isFont(name): This function verify if file is a font.
  • isImage(name): This function verify if file is a image.
  • isVideo(name): This function verify if file is a video.
  • verify(name): This function checks what type your file is.