Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
733 bytes
|
Line | |
---|
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 file path is a binary file
|
---|
4 |
|
---|
5 |
|
---|
6 | ## Install
|
---|
7 |
|
---|
8 | ```
|
---|
9 | $ npm install is-binary-path
|
---|
10 | ```
|
---|
11 |
|
---|
12 |
|
---|
13 | ## Usage
|
---|
14 |
|
---|
15 | ```js
|
---|
16 | const isBinaryPath = require('is-binary-path');
|
---|
17 |
|
---|
18 | isBinaryPath('source/unicorn.png');
|
---|
19 | //=> true
|
---|
20 |
|
---|
21 | isBinaryPath('source/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](https://sindresorhus.com), [Paul Miller](https://paulmillr.com)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.