Skip to content

Commit 0e4da8c

Browse files
committed
Meta tweaks
1 parent dc3c6e7 commit 0e4da8c

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/**
2-
Check if a filepath is a text file.
2+
Check if a file path is a text file.
33
44
@example
55
```
66
import isTextPath = require('is-text-path');
77
8-
isTextPath('src/unicorn.txt');
8+
isTextPath('source/unicorn.txt');
99
//=> true
1010
11-
isTextPath('src/unicorn.png');
11+
isTextPath('source/unicorn.png');
1212
//=> false
1313
```
1414
*/

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ const textExtensions = require('text-extensions');
44

55
const extensions = new Set(textExtensions);
66

7-
module.exports = filepath => {
8-
return extensions.has(path.extname(filepath).slice(1).toLowerCase());
9-
};
7+
module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());

index.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import {expectType} from 'tsd';
22
import isTextPath = require('.');
33

4-
expectType<boolean>(isTextPath('src/unicorn.txt'));
4+
expectType<boolean>(isTextPath('source/unicorn.txt'));

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "is-text-path",
33
"version": "1.0.1",
4-
"description": "Check if a filepath is a text file",
4+
"description": "Check if a file path is a text file",
55
"license": "MIT",
66
"repository": "sindresorhus/is-text-path",
77
"author": {
@@ -20,9 +20,7 @@
2020
"index.d.ts"
2121
],
2222
"keywords": [
23-
"txt",
2423
"text",
25-
"ext",
2624
"extensions",
2725
"extension",
2826
"file",

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# is-text-path [![Build Status](https://travis-ci.org/sindresorhus/is-text-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-text-path)
22

3-
> Check if a filepath is a text file
3+
> Check if a file path is a text file
44
55

66
## Install
@@ -15,18 +15,18 @@ $ npm install is-text-path
1515
```js
1616
const isTextPath = require('is-text-path');
1717

18-
isTextPath('src/unicorn.txt');
18+
isTextPath('source/unicorn.txt');
1919
//=> true
2020

21-
isTextPath('src/unicorn.png');
21+
isTextPath('source/unicorn.png');
2222
//=> false
2323
```
2424

2525

2626
## Related
2727

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

3131

3232
## License

0 commit comments

Comments
 (0)