{"name":"steno","version":"3.0.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":"^17.1.2","@commitlint/config-conventional":"^17.1.0","@commitlint/prompt-cli":"^17.1.2","@sindresorhus/tsconfig":"^3.0.1","@types/node":"^18.11.0","@typicode/eslint-config":"^1.0.0","del-cli":"^5.0.0","husky":"^8.0.1","typescript":"^4.8.4","xv":"^1.1.1"},"engines":{"node":">=14.16"},"gitHead":"71ec65dcfca19d1a4adb36cb5b752587b5dda25e","_id":"steno@3.0.0","_nodeVersion":"18.11.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-uZtn7Ht9yXLiYgOsmo8btj4+f7VxyYheMt8g6F1ANjyqByQXEE2Gygjgenp3otHH1TlHsS4JAaRGv5wJ1wvMNw==","shasum":"212a11e8ef3646b610efc8953842f556fd0df28f","tarball":"http://registry-npm.ywwl.com/steno/download/steno-3.0.0.tgz","fileCount":5,"unpackedSize":8645,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBTvfkFeUeeNS1A5S6K387O1SD2CmOaUNpUhIW1Ti10TAiEAtZuJbjqmTuICN6kBp+Zbgd119ecQjgL6Q9vVj9ecLPo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTYrvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrR7g//QZiArUKPBz39kz6H7SifiWJVEhDx3FrZ+blji7YvjbArOAoe\r\nJ/TtCbBoZ2tryvujaHilsKw7jcAxp1uQvcSpXQ5m/MzgVboFDux4+mbyp2by\r\nhe2ma5g0ADGleTQ2QgkwZjxBBHQvKu/6J6P5ov7wNPhkCTDhP4etWh56tqYX\r\nNSKz4hK2JGLEvKFDBR5MMDh79i7g0KXFesJdlh3VQS5LDhCAcpL/BESbqHsh\r\na+9gCDFcWCgUxa23sVQ5mP5AQk9+K5wZAxRGzuHtmtO+t+/V5h6SgZEzSx7I\r\nAyYQYuCf/cWbeEFU5pKMuVcwDwrn9P93gPWF06zQ4eSUGMKtZCl8np467gFZ\r\nJBVeue0NvmZbe36M035X6zQ2b+XAJdLrOI+tuDFFH0PhNJX/uT2LZ2A1n9tT\r\n8ksPx/x8CIOFTmBK+aq0hh4oEOKWFC32quYwOGSyxgPQf2LL0ArczHjpr6Cq\r\nLKeWEQagIt604P9uCr2ll7MV8HCLeQSJ6lGPQkmxgqIMXL0Qs7rDPXywuJJl\r\nkhntK0rbj/EYcIbTRe8M02c30tBbScgcmFU7P40AFVa3ojMZF5sNWoj2TxFv\r\nlTOoHlPP9yruOc3ar9oUoA7W6Kmec7vdi9BzUeb3XK0fuX0JaGfsECsxoVki\r\nZNyS7BJoskWL+Wa41ghFypHEzU53WWIslY4=\r\n=+rgC\r\n-----END PGP SIGNATURE-----\r\n","size":3280,"noattachment":false,"key":"/steno/-/steno-3.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_3.0.0_1666026223755_0.539819653700286"},"_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":1666026223961,"_cnpm_publish_time":1666026223961,"dist-tags":{"latest":"4.0.2"}}