{"name":"steno","version":"0.5.0","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":"9ff61b06f56a6a6959e3b52da82f9192b53f2850","_id":"steno@0.5.0","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-mWvMbYCGns7Fvj0ACjw8L4ZL+sDQSh2nMplMUt2fnHYVVPPaWSDAMLjv6IuMpjLwUhUWPpfzSNLpu+5ACkUyWA==","shasum":"d39fa388c7e7579e3f157495ec65c98cbbf70ae5","tarball":"http://registry-npm.ywwl.com/steno/download/steno-0.5.0.tgz","fileCount":5,"unpackedSize":5915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJecrTbCRA9TVsSAnZWagAAjOMP/2ElgPB6a5kl/YctUe0w\nHplbLHO1KbyMehtZO4q1Cf6YbjMDPdTTGD8SfP89LLBW++P3ic+PRlEO4wst\nGt77uISd0owFqKejvk29P0F8USSWKUeZxFN/wXxPDcktAE6PlwXDTS/VaQ6b\ntVzfUFYqiuIdVn3COytx1AFHfkW0OZMlI99gEwohLeYggN8rIIXSjuFFB5x7\nOCFQaKzqbTYZI2Xbh+IMXla7yHlQrecW2xbHieh65soA7gLRODruEBJzKSib\nkXcb+bz36OV3KzViXC7O/wpQLzH8oWgdS35aLTVTwgOA4ArvqnltkAb/ZYOT\nFi139DFxquil6TkesFxAHVmhXwOukg2fyPPmKe53IQa7Zr7vY+wLTRLhq26j\ngA3uzirfotuZJHTKjeVLF1XBqaSH0iKTvvb2wat8HMTsbSAn5Y8A9ItyN6MA\n504R+W0I0GnlrtbZGDt+tUIrQFC3wqvODNrwtMD3INuLJDOOdJqlTxRRQNpY\nm14G5S0Pc2aY/wBdSrq1Do047ocQqI0AEG15A8yYQo2ZKeUGyRVA6EeSlizN\njfkw4kdVIVeztQ+xyct7jjT8C6O3a4qI85M0e1b8IdqtZnyk+MHzo1RrDq3c\n1ABfMFhr22R4v/2cusjxicQnWKuq7ZzBBCl+G/iUwRx0fuEd/Dz765APKpSF\n3U9l\r\n=D9YV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAK2ReKeNhsViGP67tfDVz9zCtrpwGkw9kiu179jtejsAiBg4SJoQSOnVSa1a0LjdCJZtp2+paGItz+KdpuxqdLuaQ=="}],"size":2776,"noattachment":false,"key":"/steno/-/steno-0.5.0.tgz"},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/steno_0.5.0_1584575707078_0.1898649231977867"},"_hasShrinkwrap":false,"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":1584575707224,"_cnpm_publish_time":1584575707224,"dist-tags":{"latest":"4.0.2"}}