diff --git a/packages/node-fs/demo/node-fs.mjs b/packages/node-fs/demo/node-fs.mjs new file mode 100644 index 00000000..8a872477 --- /dev/null +++ b/packages/node-fs/demo/node-fs.mjs @@ -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')