Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
696 bytes
|
Rev | Line | |
---|
[6a3a178] | 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 |
|
---|
| 3 | > Check if a filepath is a binary file
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | ## Install
|
---|
| 7 |
|
---|
| 8 | ```
|
---|
| 9 | $ npm install --save is-binary-path
|
---|
| 10 | ```
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | ## Usage
|
---|
| 14 |
|
---|
| 15 | ```js
|
---|
| 16 | var isBinaryPath = require('is-binary-path');
|
---|
| 17 |
|
---|
| 18 | isBinaryPath('src/unicorn.png');
|
---|
| 19 | //=> true
|
---|
| 20 |
|
---|
| 21 | isBinaryPath('src/unicorn.txt');
|
---|
| 22 | //=> false
|
---|
| 23 | ```
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 | ## Related
|
---|
| 27 |
|
---|
| 28 | - [`binary-extensions`](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions
|
---|
| 29 | - [`is-text-path`](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | ## License
|
---|
| 33 |
|
---|
| 34 | MIT © [Sindre Sorhus](http://sindresorhus.com)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.