New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

metadata-extract

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metadata-extract

Extract metadata from media files, with pluggable add-ons.

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
1
Created
Source

metadata-extract

Extract metadata from various types of media file using 'pluggable' extractors.

API

const extract = require('metadata-extract')
const metadata = await extract(sourceFilename, options)

options is an optional object which may include:

  • options.extractors - An array of extractors to use. These should be either filenames of the extractors included in the extractors directory of this module, or promise-returning functions of the form:
    async function (data, input) {
      return metadata
    }
    
    • input is existing metadata found by other extractors. input.mimetype will contain the mime-type if detected.
    • metadata must be an object containing the metadata found, or undefined if nothing was extracted.
  • options.log - A logger function (defaults to debug)
  • options.allowBuffers - If true, buffers will be allowed in

metadata is an object containing the metadata found.

Included extractors

  • extractors/music-metadata - Extract music-metdata
  • extractors/exif-tool - Extract using exiftool - requires exiftool to be installed as an external dependency. Disabled by default.
  • extractors/image-size - Get the size of images using image-size
  • extractors/pdf-text - extracts text from PDFs using pdf2json
  • extractors/text - extracts the beginning of text files
  • extractors/zip - extracts directory listing from zip files
  • extractors/epub - extracts text preview or contents listing from epub files

Keywords

metadata

FAQs

Package last updated on 07 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts