{"name":"steno","version":"3.2.0","description":"Specialized fast async file writer","keywords":["fs","file","write","writer","asynchronous","fast","race","condition","atomic","writing","safe"],"homepage":"https://github.com/typicode/steno","bugs":{"url":"https://github.com/typicode/steno/issues"},"repository":{"type":"git","url":"git+https://github.com/typicode/steno.git"},"funding":"https://github.com/sponsors/typicode","license":"MIT","author":{"name":"Typicode","email":"typicode@gmail.com"},"type":"module","exports":"./lib/index.js","types":"lib/index.d.ts","scripts":{"test":"node --import tsx/esm --test src/test.ts","build":"del-cli lib && tsc","lint":"eslint src --ext .ts --ignore-path .gitignore","prepare":"husky install","prepublishOnly":"npm run build","postversion":"git push && git push --tags && npm publish","benchmark":"npm run build && node lib/benchmark.js","commit":"commit"},"devDependencies":{"@commitlint/cli":"^17.7.2","@commitlint/config-conventional":"^17.7.0","@commitlint/prompt-cli":"^17.7.2","@sindresorhus/tsconfig":"^5.0.0","@types/node":"^20.8.3","@typicode/eslint-config":"^1.2.0","del-cli":"^5.1.0","husky":"^8.0.3","tsx":"^4.7.0","typescript":"^5.2.2"},"engines":{"node":">=16"},"_id":"steno@3.2.0","gitHead":"392e1c9bb286face9c8bd6023a1590f525e3e76d","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-zPKkv+LqoYffxrtD0GIVA08DvF6v1dW02qpP5XnERoobq9g3MKcTSBTi08gbGNFMNRo3TQV/6kBw811T1LUhKg==","shasum":"6c043aa57b3e7984396f00359c4db1e09a5dccbf","tarball":"http://registry-npm.ywwl.com/steno/download/steno-3.2.0.tgz","fileCount":5,"unpackedSize":6435,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/97fKSES9Y72FWh5nPILw4313OfNkA5w2t68EHcG6DQIgLTwM/aJrjS/Lkugon+pagxbvbL+FfPOfqS/rMp68lYo="}],"size":2915,"noattachment":false,"key":"/steno/-/steno-3.2.0.tgz"},"_npmUser":{"name":"typicode","email":"typicode@gmail.com"},"directories":{},"maintainers":[{"name":"typicode","email":"typicode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/steno_3.2.0_1703553265339_0.08100287914627602"},"_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":1703553265938,"_cnpm_publish_time":1703553265938,"dist-tags":{"latest":"4.0.2"}}