{"name":"steno","version":"2.0.0","description":"Specialized fast async file writer","type":"module","exports":"./lib/index.js","types":"lib/index.d.ts","scripts":{"test":"npm run build && xv 'lib/**/*.test.js'","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"},"repository":{"type":"git","url":"git+https://github.com/typicode/steno.git"},"keywords":["fs","file","write","writer","asynchronous","fast","race","condition","atomic","writing","safe"],"author":{"name":"Typicode","email":"typicode@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/typicode/steno/issues"},"homepage":"https://github.com/typicode/steno","devDependencies":{"@commitlint/cli":"^12.0.1","@commitlint/config-conventional":"^12.0.1","@commitlint/prompt-cli":"^12.0.1","@sindresorhus/tsconfig":"^1.0.2","@types/node":"^15.6.1","@typicode/eslint-config":"^0.1.0","del-cli":"^3.0.1","husky":"^6.0.0","typescript":"^4.2.2","xv":"^0.1.0"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"92e06b04b6efdc079b66326fa0de32abc143695a","_id":"steno@2.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.15.0","dist":{"integrity":"sha512-GhVTL9HHZk2R+ApyU/rDFbSZRoXjyaGYWkt0Esxz6+Ocwbn7Etbz6SzlvX5tanuYIRyQ2q8E3+GMuAfih772Fw==","shasum":"1dff26d139f7771012c068693afdca4cd00f5ebd","tarball":"http://registry-npm.ywwl.com/steno/download/steno-2.0.0.tgz","fileCount":5,"unpackedSize":7342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvEQfCRA9TVsSAnZWagAA+TEQAJMmeRwl23qfxEmqh11w\nWBvjnCfUIeXXGY/mAuiPrPH3ScbUcJ4l6ERfCIwZAtjzAHYQCAmgIaHZVvV1\nzgfnoAeTh2MZPgefHSaqUnr5Rcbyh7U8yqsEWE88O3Y94p8wRXdO5f66NpXE\nV0JxqZX3l9kVRp6c5UX4mBE0+n4oszTPvMQ0zukg31HOE1DW51QiYtoErDal\nxEq13xFocznMAqYG7tz1YFTYFNhk+Z1GkT5KbXXN5y+K2xlbq6Na8u6SvSyu\nqCNLArmLKhTeiiPJ7KMwJ10tOYnsCnoQq6rLqkMYUo0DElC3FLjeia+y1t3M\n3UQmVBzQiuj2GddWmz4AOEzEpuSPsxCXrlGfeAc9CoPMmDKoF4zcTv0oSKs+\n3fpLSl1d2Z0pEykoYiCIpD8/sMG4e2+8R3z6mgGBOtfmJj0qlMLX1Tee2A8d\nO4H56bGx36qho8eCjOZoxKEPHZfPVEJwtllYKYCiasM+RSrHJ+1K51bTyEvN\nKfXKJgGIxWQs9m3A/1qoFXK7qQV4ldkRziO5NPXjtT36iBF5B9LLFfC+ptED\nz90RC7Ce3tD2ekzmCr4lYrC/nor2Qe9F4khLm+GsFRkbZUPVwBxfjMvUSl6U\nVfqw1ilfI/a102HReGGTaLCFpWJczV6g5RndIXJoU6kUI8cnmzpxdkNq+Y21\nad8J\r\n=n0Km\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCd3M+iRMyGEryGBwDil8muLM2/3mgbEf+XyFHmv4foEQIgdkzavP3PkfPVnFgYqwLMopAn6bXzJho++erAuMKBwfY="}],"size":2853,"noattachment":false,"key":"/steno/-/steno-2.0.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.0.0_1622950943665_0.9261681450664279"},"_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":1622950943870,"_cnpm_publish_time":1622950943870,"dist-tags":{"latest":"4.0.2"}}