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

type-files

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-files

> Detect the file type of a base64 The file type is detected by checking the [magic number] of the base64.

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
167
1.21%
Maintainers
1
Weekly downloads
 
Created
Source

type-files

Detect the file type of a base64 The file type is detected by checking the [magic number] of the base64.

This package is for detecting bas64 based file formats, not binary based formats.

Install

npm install type-files

Usage

Node.js

Determine file type from a file:

import {detectMimeType} from 'type-files';
console.log(detectMimeType('iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB'));
//=> {ext: 'png', mime: 'image/png'}

Keywords

base64

FAQs

Package last updated on 01 Nov 2022

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