You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Returns**: <code>Promise.<(boolean\|null)></code> - `true` if repository is dirty, `false` if repository is clean, `null` if given directory is not a git repository
25
+
**Returns**: <code>Promise.<string></code> - File contents in UTF-8 or null if file could not be read
21
26
22
27
| Param | Type | Description |
23
28
| --- | --- | --- |
24
-
|directory| <code>string</code> |Absolute path to a git repository directory|
29
+
|file| <code>string</code> |Path to a file|
25
30
26
31
**Example**
27
32
```javascript
28
33
importreadFileStringfrom"read-file-string"
29
-
constresult=awaitreadFileString("/my/path")
30
-
result ===false
34
+
constresult=awaitreadFileString("readme.md")
35
+
result ==="## Hewwo OwO"
36
+
```
37
+
**Kind**: static method of [<code>module.exports</code>](#exp_module_read-file-string--module.exports)
38
+
**Returns**: <code>string</code> - File contents in UTF-8 or null if file could not be read
0 commit comments