{"name":"steno","version":"3.1.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":"npm run build && xv lib","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","typescript":"^5.2.2","xv":"^2.1.1"},"engines":{"node":">=16"},"_id":"steno@3.1.1","gitHead":"a6c4921c9de838bc691c9ff5a03ac3a6dfcdef05","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-B7c6EVH7oEiaMRW36SjUnktkDwp/qd4pQiduylyiqvcZEZDeX0IIFZRBZdwO/RaVo60M0wkDwC0e8yeKaR4VGg==","shasum":"713dad214ec673f7a3cbb7c0f318dba4be398490","tarball":"http://registry-npm.ywwl.com/steno/download/steno-3.1.1.tgz","fileCount":5,"unpackedSize":6261,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoHPMHHU3R/r0HF/tdg4k2c1BJfxadO6QpqoynTeuknAIgbrzcVL60869z3oHXWOFx4ZzuaebHUiamAjwiMkHH+Ss="}],"size":2871,"noattachment":false,"key":"/steno/-/steno-3.1.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_3.1.1_1698068385017_0.5303629397007246"},"_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":1698068385173,"_cnpm_publish_time":1698068385173,"dist-tags":{"latest":"4.0.2"}}