Socket
Socket
Sign inDemoInstall

is-binary-path

Package Overview
Dependencies
1
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-binary-path

Check if a file path is a binary file


Version published
Maintainers
3
Weekly downloads
31,213,232
decreased by-26.16%

Weekly downloads

Package description

What is is-binary-path?

The is-binary-path npm package is used to determine if a given file path is a binary file or not. It checks the file extension against a list of known binary file types.

What are is-binary-path's main functionalities?

Check if a file path is a binary file

This feature allows you to check if a file path points to a binary file by using the file extension. It returns true if the file is a binary file, otherwise false.

const isBinaryPath = require('is-binary-path');

console.log(isBinaryPath('image.png')); // true
console.log(isBinaryPath('document.txt')); // false

Other packages similar to is-binary-path

Readme

Source

is-binary-path Build Status

Check if a file path is a binary file

Install

$ npm install is-binary-path

Usage

const isBinaryPath = require('is-binary-path');

isBinaryPath('source/unicorn.png');
//=> true

isBinaryPath('source/unicorn.txt');
//=> false

License

MIT © Sindre Sorhus, Paul Miller

Keywords

FAQs

Last updated on 19 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