# is-text-path

> Check if a file path is a text file

Latest version **3.0.0** (published 2024-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-text-path
pnpm add is-text-path
yarn add is-text-path
bun add is-text-path
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2024-04-30 |
| First published | 2015-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18.20 |
| Dependencies | 1 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | text, extensions, extension, file, path, check, detect, is |

## Links

- npm: https://www.npmjs.com/package/is-text-path
- Repository: https://github.com/sindresorhus/is-text-path
- Homepage: https://github.com/sindresorhus/is-text-path#readme
- Issues: https://github.com/sindresorhus/is-text-path/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-text-path

## Dependencies (1)

- [text-extensions](https://npm.io/package/text-extensions.md) ^3.0.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2024-04-30
- 2.0.0 — 2019-04-19
- 1.0.1 — 2015-05-25
- 1.0.0 — 2015-02-16

## README

# is-text-path

> Check if a file path is a text file

## Install

```sh
npm install is-text-path
```

## Usage

```js
import isTextPath from 'is-text-path';

isTextPath('source/unicorn.txt');
//=> true

isTextPath('source/unicorn.png');
//=> false
```

## Related

- [`text-extensions`](https://github.com/sindresorhus/text-extensions) - List of text file extensions
- [`is-binary-path`](https://github.com/sindresorhus/is-binary-path) - Check if a file path is a binary file

---
_Source: https://npm.io/package/is-text-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
