{"name":"steno","version":"2.1.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":"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":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@commitlint/prompt-cli":"^13.1.0","@sindresorhus/tsconfig":"^1.0.2","@types/node":"^16.6.1","@typicode/eslint-config":"^0.1.2","del-cli":"^4.0.1","husky":"^7.0.1","typescript":"^4.3.5","xv":"^0.2.3"},"engines":{"node":"^14.13.1 || >=16.0.0"},"gitHead":"019bf507435ff7d31a262d3a36418686dfdef4cf","_id":"steno@2.1.0","_nodeVersion":"16.5.0","_npmVersion":"7.20.5","dist":{"integrity":"sha512-mauOsiaqTNGFkWqIfwcm3y/fq+qKKaIWf1vf3ocOuTdco9XoHCO2AGF1gFYXuZFSWuP38Q8LBHBGJv2KnJSXyA==","shasum":"05a9c378ce42ed04f642cda6fcb41787a10e4e33","tarball":"http://registry-npm.ywwl.com/steno/download/steno-2.1.0.tgz","fileCount":5,"unpackedSize":8682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHCiwCRA9TVsSAnZWagAAn7YP/0yoTyNlSheb7ndDl+/M\nEDz5bFhhX0vqlTRBvEgzl6AT+mqgb1YLoeS/z4s06av6xhd0HkK0aZwwLkh7\nBiosgaF+qDdPTJEYtpQ88N4jyd/5T0S63jmK3D9l/MffU2fNk2dPw71/wFzw\n08SEZaFLz1ULo2gtLgmv/dHNkfy5czmkctLlfLMVnx2IYdlXQ8oTTA9PaAbC\nXHEmoUFZ2Ba6VKcbJjIqoI5WrS7IQMNC07CFmuvS9eHBY/fQc0VlTtZmtcCD\nAPKD39dtYE2GOKbk/vEGdWcEVTyJs8Z0Mwl/lxmGr5C2F+0QZRjqTcFYriuB\n3oZwlCRbE+JGHxbsi99Ya35G3W1llK03m59YyJn5QE4RGM+YZnBSJnmMX6c9\n23s2E1uwAjkGv2DJ0Zute+636YUy/ixlzsB58OW3CkN8g8Q/qoxrcBNFrTAz\nm7mBnTjPfYTYOQ2gwXG3QKdc33oqYwaObGkl7T3mL7TnmrtV5PaU0CNZJ8+o\nfJidRIWp0hpK8EV3tGE7ouJrguVsAgzWkYsFCXYfrj3q7RiTJdAuVGYYQELl\nOA2zygph6t1O18ZMn8Av8A20YE9+zaLfhjCUmsSoV74l8fUDb2uBo8zHYOBv\ni99MFircCQC/6pjTJaaTBWRt2D4+M9Yf8E7CwUqKHxHfsZi3fgNmx/vTKt6D\n6FdE\r\n=sTqc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/aYV78f+azW0ss5IJxdlsydrIdcrONMdO4MRDkSZwPAiAnH5PeS8kF0SlSHN9YriMb4HzEZWHtK+5lopj9mirC3w=="}],"size":3224,"noattachment":false,"key":"/steno/-/steno-2.1.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_2.1.0_1629235376578_0.8286608165344509"},"_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":1629235376736,"_cnpm_publish_time":1629235376736,"dist-tags":{"latest":"4.0.2"}}