fast-write-atomic
Fast way to write a file atomically, for Node.js
Last updated 6 years ago by matteo.collina .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install fast-write-atomic 
SYNC missed versions from official npm registry.

fast-write-atomic

BuildStatus

Fast way to write a file atomically, for Node.js

Status: experimental

Install

npm i fast-write-atomic

Example

const writeFile = require('fast-write-atomic')

const data = Buffer.from('hello world')

writeFile('./hello', data, function (err) {
  if (err) {
    console.log(err)
    return
  }

  console.log('file written')
})

Benchmarks

Those benchmarks writes a 1 MB file a thousand times:

benchWriteFileAtomic*1000: 9830.501ms
benchFastWriteAtomic*1000: 8848.916ms
benchWriteFileAtomic*1000: 9944.722ms
benchFastWriteAtomic*1000: 8997.108ms

License

MIT

Current Tags

  • 0.2.1                                ...           latest (6 years ago)

4 Versions

  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE