{"name":"steno","version":"4.0.1","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/async-retry":"^1.4.8","@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":">=18"},"dependencies":{"async-retry":"^1.3.3"},"_id":"steno@4.0.1","gitHead":"cc5b46b459a69a1efe39a7506cd82711150c894a","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-yNPsfgtJaRmixtMa0GYS8/QxkFqEhD/uOqRBjteULNfCYHsULakW63VKL9b7V9U705ZTeJdwPGFRN9bbsL1leA==","shasum":"276ffad71cfd99a6db71d8eca8ec2120f7ac8252","tarball":"http://registry-npm.ywwl.com/steno/download/steno-4.0.1.tgz","fileCount":5,"unpackedSize":6665,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFn8bIfnE2VbtqJlZ9AaX0Bzuc2ClisknZuboaPEUE6AiBBqhPpw4UhcnTuY/nYzbM4WDIf53GVYdLm/E8ncDXFFQ=="}],"size":2986,"noattachment":false,"key":"/steno/-/steno-4.0.1.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_4.0.1_1703566155049_0.4253909128633291"},"_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":1703566155213,"_cnpm_publish_time":1703566155213,"dist-tags":{"latest":"4.0.2"}}