write-files-atomic
Write many files atomically
- Creates temporary files with file contents
- Moves them all at once using
rename()
- Automatically cleans up after itself
- Optimized to be as fast as possible
- Doesn't break file watchers
- Doesn't swallow errors
- Includes Flow types
Install
yarn add write-files-atomic
Usage
const writeFilesAtomic = ; await ;
API
; declare ;