We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c932bd commit 271c8e1Copy full SHA for 271c8e1
README.md
@@ -14,9 +14,16 @@ npm i @quansync/fs
14
15
```ts
16
import { readFile } from '@quansync/fs'
17
+import { quansync } from 'quansync'
18
19
const resultAsync = await readFile('/path', 'utf8')
20
const resultSync = readFile.sync('/path', 'utf8')
21
+
22
+const readFileTrimmed = quansync(function* (id: string) {
23
+ const text = yield* readFile(id, 'utf8').trim()
24
+ return text
25
+})
26
+const readFileTrimmedSync = readFileTrimmed.sync
27
```
28
29
## Sponsors
0 commit comments