1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/is-binary-path/readme.md

35 lines
733 B
Markdown
Raw Normal View History

2023-12-18 13:12:25 +08:00
# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path)
2024-01-16 21:26:16 +08:00
> Check if a file path is a binary file
2023-12-18 13:12:25 +08:00
## Install
```
2024-01-16 21:26:16 +08:00
$ npm install is-binary-path
2023-12-18 13:12:25 +08:00
```
## Usage
```js
2024-01-16 21:26:16 +08:00
const isBinaryPath = require('is-binary-path');
2023-12-18 13:12:25 +08:00
2024-01-16 21:26:16 +08:00
isBinaryPath('source/unicorn.png');
2023-12-18 13:12:25 +08:00
//=> true
2024-01-16 21:26:16 +08:00
isBinaryPath('source/unicorn.txt');
2023-12-18 13:12:25 +08:00
//=> false
```
## Related
2024-01-16 21:26:16 +08:00
- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions
- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file
2023-12-18 13:12:25 +08:00
## License
2024-01-16 21:26:16 +08:00
MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com)