You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
696 B

4 years ago
  1. # is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path)
  2. > Check if a filepath is a binary file
  3. ## Install
  4. ```
  5. $ npm install --save is-binary-path
  6. ```
  7. ## Usage
  8. ```js
  9. var isBinaryPath = require('is-binary-path');
  10. isBinaryPath('src/unicorn.png');
  11. //=> true
  12. isBinaryPath('src/unicorn.txt');
  13. //=> false
  14. ```
  15. ## Related
  16. - [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions
  17. - [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
  18. ## License
  19. MIT © [Sindre Sorhus](http://sindresorhus.com)