Skip to content

Commit 33dfe50

Browse files
committed
Document async/await usage
1 parent 0113977 commit 33dfe50

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ const options = {
2929
};
3030
```
3131

32+
### Asynchronous replacement with `async`/`await`
33+
34+
```js
35+
try {
36+
const changes = await replace(options)
37+
console.log('Modified files:', changes.join(', '));
38+
}
39+
catch (error) {
40+
console.error('Error occurred:', error);
41+
}
42+
```
43+
3244
### Asynchronous replacement with promises
3345

3446
```js

0 commit comments

Comments
 (0)