Skip to content

Commit

Permalink
feat(node-fs): demo
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Jan 6, 2024
1 parent 5a1100d commit bc78ba8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/node-fs/demo/node-fs.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {writeJsonFile, WriteFileMode} from '@alwatr/node-fs';

for (let i = 10; i > 0; i--) {
console.log('request write file %s without waiting...', i);
writeJsonFile('./file.json', {i, a: 'b'}, WriteFileMode.Rename);
}

console.log('loop done, wait for queue process')

0 comments on commit bc78ba8

Please sign in to comment.