Socket
Socket
Sign inDemoInstall

binary-extensions

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    binary-extensions

List of binary file extensions


Version published
Weekly downloads
38M
decreased by-10.08%
Maintainers
1
Install size
6.04 kB
Created
Weekly downloads
 

Package description

What is binary-extensions?

The binary-extensions npm package provides a list of binary file extensions. This package can be used to check if a file extension is generally considered to be binary. It is useful when handling file uploads, file processing, or any other file-related operations where knowing if a file is binary or text can be crucial.

What are binary-extensions's main functionalities?

Check if an extension is binary

This code checks if the 'png' extension is included in the list of binary extensions, indicating that files with this extension are binary.

const binaryExtensions = require('binary-extensions');

if (binaryExtensions.includes('png')) {
  console.log('The file extension is binary.');
} else {
  console.log('The file extension is not binary.');
}

Other packages similar to binary-extensions

Readme

Source

binary-extensions Build Status

List of binary file extensions

The list is just a JSON file and can be used anywhere.

Install

$ npm install binary-extensions

Usage

const binaryExtensions = require('binary-extensions');

console.log(binaryExtensions);
//=> ['3ds', '3g2', …]

License

MIT © Sindre Sorhus, Paul Miller

Keywords

FAQs

Last updated on 18 Apr 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc