Skip to content

Commit 48fe90f

Browse files
committed
Rebuilt readme with tldw
1 parent d5ddcf5 commit 48fe90f

File tree

1 file changed

+24
-39
lines changed

1 file changed

+24
-39
lines changed

readme.md

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
# read-file-string
22

33

4-
Returns file content as a UTF-8 string. Returns null if file does not exist (or is a directory) instead of throwing an Error.
5-
6-
<a href="https://raw.githubusercontent.com/Jaid/read-file-string/master/license.txt"><img src="https://img.shields.io/github/license/Jaid/read-file-string?style=flat-square&color=success" alt="License"/></a>
7-
<a href="https://github.com/Jaid/read-file-string/commits"><img src="https://img.shields.io/github/commits-since/Jaid/read-file-string/v1.0.2?style=flat-square&logo=github&color=success" alt="Commits since v1.0.2"/></a> <a href="https://github.com/Jaid/read-file-string/commits"><img src="https://img.shields.io/github/last-commit/Jaid/read-file-string?style=flat-square&logo=github&color=red" alt="Last commit"/></a> <a href="https://github.com/Jaid/read-file-string/issues"><img src="https://img.shields.io/github/issues/Jaid/read-file-string?style=flat-square&logo=github&color=red" alt="Issues"/></a>
8-
<a href="https://npmjs.com/package/read-file-string"><img src="https://img.shields.io/npm/v/read-file-string?style=flat-square&logo=npm&label=latest%20version&color=success" alt="Latest version on npm"/></a> <a href="https://github.com/Jaid/read-file-string/network/dependents"><img src="https://img.shields.io/librariesio/dependents/npm/read-file-string?style=flat-square&logo=npm&color=red" alt="Dependents"/></a> <a href="https://npmjs.com/package/read-file-string"><img src="https://img.shields.io/npm/dm/read-file-string?style=flat-square&logo=npm&color=red" alt="Downloads"/></a>
9-
10-
11-
4+
<a href="https://raw.githubusercontent.com/jaid/read-file-string/master/license.txt"><img src="https://img.shields.io/github/license/jaid/read-file-string?style=flat-square" alt="License"/></a> <a href="https://github.com/sponsors/jaid"><img src="https://img.shields.io/badge/<3-Sponsor-FF45F1?style=flat-square" alt="Sponsor read-file-string"/></a>
5+
<a href="https://actions-badge.atrox.dev/jaid/read-file-string/goto"><img src="https://img.shields.io/endpoint.svg?style=flat-square&url=https%3A%2F%2Factions-badge.atrox.dev%2Fjaid%2Fread-file-string%2Fbadge" alt="Build status"/></a> <a href="https://github.com/jaid/read-file-string/commits"><img src="https://img.shields.io/github/commits-since/jaid/read-file-string/v1.0.2?style=flat-square&logo=github" alt="Commits since v1.0.2"/></a> <a href="https://github.com/jaid/read-file-string/commits"><img src="https://img.shields.io/github/last-commit/jaid/read-file-string?style=flat-square&logo=github" alt="Last commit"/></a> <a href="https://github.com/jaid/read-file-string/issues"><img src="https://img.shields.io/github/issues/jaid/read-file-string?style=flat-square&logo=github" alt="Issues"/></a>
6+
<a href="https://npmjs.com/package/read-file-string"><img src="https://img.shields.io/npm/v/read-file-string?style=flat-square&logo=npm&label=latest%20version" alt="Latest version on npm"/></a> <a href="https://github.com/jaid/read-file-string/network/dependents"><img src="https://img.shields.io/librariesio/dependents/npm/read-file-string?style=flat-square&logo=npm" alt="Dependents"/></a> <a href="https://npmjs.com/package/read-file-string"><img src="https://img.shields.io/npm/dm/read-file-string?style=flat-square&logo=npm" alt="Downloads"/></a>
127

8+
**Returns file content as a UTF-8 string. Returns null if file does not exist (or is a directory) instead of throwing an Error.**
139

1410

1511

@@ -27,51 +23,40 @@ yarn add read-file-string@^1.0.2
2723

2824

2925

30-
<a name="module_read-file-string"></a>
3126

32-
## Reference
3327

34-
* [read-file-string](#module_read-file-string)
35-
* [module.exports(file)](#exp_module_read-file-string--module.exports) ⇒ <code>Promise.&lt;(string\|null)&gt;</code> ⏏
36-
* [.readFileStringSync(file)](#module_read-file-string--module.exports.readFileStringSync) ⇒ <code>string</code> \| <code>null</code>
3728

38-
<a name="exp_module_read-file-string--module.exports"></a>
3929

40-
### module.exports(file) ⇒ <code>Promise.&lt;(string\|null)&gt;</code> ⏏
41-
**Kind**: Exported function
42-
**Returns**: <code>Promise.&lt;(string\|null)&gt;</code> - File contents in UTF-8 or null if file could not be read
4330

44-
| Param | Type | Description |
45-
| --- | --- | --- |
46-
| file | <code>string</code> | Path to a file |
4731

48-
**Example**
49-
```javascript
50-
import readFileString from "read-file-string"
51-
const result = await readFileString("readme.md")
52-
result === "## Hewwo OwO"
53-
```
54-
<a name="module_read-file-string--module.exports.readFileStringSync"></a>
5532

56-
#### module.exports.readFileStringSync(file) ⇒ <code>string</code> \| <code>null</code>
57-
**Kind**: static method of [<code>module.exports</code>](#exp_module_read-file-string--module.exports)
58-
**Returns**: <code>string</code> \| <code>null</code> - File contents in UTF-8 or null if file could not be read
5933

60-
| Param | Type | Description |
61-
| --- | --- | --- |
62-
| file | <code>string</code> | Path to a file |
6334

64-
**Example**
65-
```javascript
66-
import {readFileStringSync} from "read-file-string"
67-
const result = readFileStringSync("readme.md")
68-
result === "## Hewwo OwO"
69-
```
7035

7136

7237

7338

7439

40+
## Development
41+
42+
43+
44+
Setting up:
45+
```bash
46+
git clone git@github.com:jaid/read-file-string.git
47+
cd read-file-string
48+
npm install
49+
```
50+
Testing:
51+
```bash
52+
npm run test:dev
53+
```
54+
Testing in production environment:
55+
```bash
56+
npm run test
57+
```
58+
59+
7560
## License
7661
```text
7762
MIT License

0 commit comments

Comments
 (0)