is-text-path
Check if a file path is a text file
Install
$ npm install is-text-path
Usage
const isTextPath = require('is-text-path');
isTextPath('source/unicorn.txt');
//=> true
isTextPath('source/unicorn.png');
//=> false
Related
text-extensions
- List of text file extensionsis-binary-path
- Check if a file path is a binary file
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.