{"name":"steno","version":"0.4.4","description":"Simple file writer with race condition prevention and atomic writing","main":"index.js","scripts":{"test":"node test | tap-dot && standard","prepush":"npm test"},"repository":{"type":"git","url":"git+https://github.com/typicode/steno.git"},"keywords":["fs","file","write","writer","asynchronous","race","condition","atomic","writing","safe"],"author":{"name":"typicode"},"license":"MIT","bugs":{"url":"https://github.com/typicode/steno/issues"},"homepage":"https://github.com/typicode/steno","devDependencies":{"after":"^0.8.1","husky":"^0.11.1","standard":"^6.0.7","tap-dot":"^0.2.3","tape":"^3.0.1"},"dependencies":{"graceful-fs":"^4.1.3"},"gitHead":"06e4e11e98dc3550d855e7731f80aacc2cbbd2c3","_id":"steno@0.4.4","_shasum":"071105bdfc286e6615c0403c27e9d7b5dcb855cb","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.0","_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"dist":{"shasum":"071105bdfc286e6615c0403c27e9d7b5dcb855cb","tarball":"http://registry-npm.ywwl.com/steno/download/steno-0.4.4.tgz","integrity":"sha512-EEHMVYHNXFHfGtgjNITnka0aHhiAlo93F7z2/Pwd+g0teG9CnM3JIINM7hVVB5/rhw9voufD7Wukwgtw2uqh6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEiEf1fzqLeY+vHfIvKT6rP/uOyCZleRBDGMMlSgAboSAiAW72UnjTjwe4burNgCw5ei3Xug4rrmmh8xInvmoPJ4cg=="}],"size":2812,"noattachment":false,"key":"/steno/-/steno-0.4.4.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/steno-0.4.4.tgz_1457525446258_0.39970230776816607"},"directories":{},"readme":"# Steno [![](http://img.shields.io/npm/dm/steno.svg?style=flat)](https://www.npmjs.org/package/steno) [![Node.js CI](https://github.com/typicode/steno/actions/workflows/node.js.yml/badge.svg)](https://github.com/typicode/steno/actions/workflows/node.js.yml)\n\n> Specialized fast async file writer\n\n**Steno** makes writing to the same file often/concurrently fast and safe.\n\nUsed in [lowdb](https://github.com/typicode/lowdb).\n\n_https://en.wikipedia.org/wiki/Stenotype_\n\n## Features\n\n- ⚡ Fast (see benchmark)\n- 🐦 Lightweight (~6kb)\n- 👍 ⚛️ Safe: No partial writes (writes are atomic)\n- 👍 🏁 Safe: No race conditions (writes are ordered even if they're async)\n\n## Usage\n\n```javascript\nimport { Writer } from 'steno'\n\n// Create a singleton writer\nconst file = new Writer('file.txt')\n\n// Use it in the rest of your code\nasync function save() {\n  await file.write('some data')\n}\n```\n\n## Benchmark\n\n`npm run benchmark` (see `src/benchmark.ts`)\n\n```\nWrite 1KB data to the same file x 1000\n  fs     :   62ms\n  steno  :    1ms\n\nWrite 1MB data to the same file x 1000\n  fs     : 2300ms\n  steno  :    5ms\n```\n\n_Steno uses a smart queue and avoids unnecessary writes._\n\n## License\n\nMIT - [Typicode](https://github.com/typicode)\n","publish_time":1457525450243,"_cnpm_publish_time":1457525450243,"dist-tags":{"latest":"4.0.2"}}