npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@nottimtam/file-converter-core

v1.2.30

Published

Core file conversion modules for @nottimtam/file-converter.

Downloads

3,086

Readme

@nottimtam/file-converter-core

Core file conversion modules for @nottimtam/file-converter.

Installation

npm i @nottimtam/file-converter @nottimtam/file-converter-core

Usage

See file-converter for general implementation instructions. To implement these modules, add them to the modules array of your FileConverter constructor:

import FileConverter from "@nottimtam/file-converter";
import CoreModules from "@nottimtam/file-converter-core";

const fileConverter = new FileConverter({
	modules: [...CoreModules],
});

Modules

You can use all the modules:

import CoreModules from "@nottimtam/file-converter-core";

Or just the groups you need:

import {
	ImageModules,
	DocumentModules,
	VideoModules,
	AudioModules,
} from "@nottimtam/file-converter-core";

Do not use both CoreModules and a sub-group at the same time, or conflict errors will be thrown.

NOTE: To use the audio/video modules, you will need to have ffmpeg installed to the system your application is running on.

For a Dockerfile, you can add the line:

RUN apt-get update && apt-get install -y \
    ffmpeg \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

If you do not want to use AudioModules or VideoModules, manually import the module groups you would like to use instead of using CoreModules

ImageModules

  • JPEGToPNG — image/jpeg to image/png
  • JPEGToWebP — image/jpeg to image/webp
  • JPEGToGIF — image/jpeg to image/gif
  • JPEGToAVIF — image/jpeg to image/avif
  • JPEGToTIFF — image/jpeg to image/tiff
  • PNGToJPEG — image/png to image/jpeg
  • PNGToWebP — image/png to image/webp
  • PNGToGIF — image/png to image/gif
  • PNGToAVIF — image/png to image/avif
  • PNGToTIFF — image/png to image/tiff
  • WebPToPNG — image/webp to image/png
  • WebPToJPEG — image/webp to image/jpeg
  • WebPToGIF — image/webp to image/gif
  • WebPToAVIF — image/webp to image/avif
  • WebPToTIFF — image/webp to image/tiff
  • GIFToPNG — image/gif to image/png
  • GIFToWebP — image/gif to image/webp
  • GIFToJPEG — image/gif to image/jpeg
  • GIFToAVIF — image/gif to image/avif
  • GIFToTIFF — image/gif to image/tiff
  • AVIFToPNG — image/avif to image/png
  • AVIFToWebP — image/avif to image/webp
  • AVIFToGIF — image/avif to image/gif
  • AVIFToJPEG — image/avif to image/jpeg
  • AVIFToTIFF — image/avif to image/tiff
  • TIFFToPNG — image/tiff to image/png
  • TIFFToWebP — image/tiff to image/webp
  • TIFFToGIF — image/tiff to image/gif
  • TIFFToAVIF — image/tiff to image/avif
  • TIFFToJPEG — image/tiff to image/jpeg

DocumentModules

  • ImageToPDF — image/jpeg, image/png to application/pdf
  • PDFToTXT — application/pdf to text/plain
  • PDFToHTML — application/pdf to text/html
  • PDFToDOCX — application/pdf to application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • TXTToPDF — text/plain to application/pdf
  • TXTToDOCX — text/plain to application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • TXTToHTML — text/plain to text/html
  • HTMLToTXT — text/html to text/plain
  • DOCXToTXT — application/vnd.openxmlformats-officedocument.wordprocessingml.document to text/plain
  • DOCXToHTML — application/vnd.openxmlformats-officedocument.wordprocessingml.document to text/html

AudioModules

  • AudioToMP3 — audio/x-wav, audio/x-flac, audio/ogg, audio/x-aiff to audio/mpeg
  • AudioToWAV — audio/mpeg, audio/x-flac, audio/ogg, audio/x-aiff to audio/x-wav
  • AudioToFLAC — audio/x-wav, audio/mpeg, audio/ogg, audio/x-aiff to audio/x-flac
  • AudioToOGG — audio/x-wav, audio/x-flac, audio/mpeg, audio/x-aiff to audio/ogg
  • AudioToAIFF — audio/x-wav, audio/x-flac, audio/ogg, audio/mpeg to audio/x-aiff

VideoModules

  • VideoToMP4 — video/x-msvideo, video/x-matroska, video/quicktime, video/webm, video/mpeg, video/3gpp to video/mp4
  • VideoToAVI — video/mp4, video/x-matroska, video/quicktime, video/webm, video/mpeg, video/3gpp to video/x-msvideo
  • VideoToMOV — video/x-msvideo, video/x-matroska, video/mp4, video/webm, video/mpeg, video/3gpp to video/quicktime
  • VideoToWEBM — video/x-msvideo, video/x-matroska, video/quicktime, video/mp4, video/mpeg, video/3gpp to video/webm
  • VideoTo3GP — video/x-msvideo, video/x-matroska, video/quicktime, video/webm, video/mpeg, video/mp4 to video/3gpp