{"_id":"fast-write-atomic","_rev":"6-6ff94dde4d6a076346245aec95b4af25","name":"fast-write-atomic","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"fast-write-atomic","version":"0.1.0","keywords":["file","write","atomic"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","_id":"fast-write-atomic@0.1.0","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"homepage":"https://github.com/mcollina/fast-write-atomic#readme","bugs":{"url":"https://github.com/mcollina/fast-write-atomic/issues"},"dist":{"shasum":"9c05f1b98e7781238b7b37871d2d7bdd2337cf15","tarball":"https://registry.npmjs.org/fast-write-atomic/-/fast-write-atomic-0.1.0.tgz","fileCount":8,"integrity":"sha512-BZtVvCAjFd7IzRJkhW5eNOi6aFusAU5vjPoGYxhWam5N0PtHV0KP8m8wyXIT0Ua6o2LIH9faxlzsP18f8XjUOA==","signatures":[{"sig":"MEYCIQDdZe6yjd1xMwfRxYZz5h3WKKc5HtoLEggBfEvIAtyh9gIhAIpEc4eO1AbIDgYgcl7HPsluq/CqrgXrWGuQUzEEx+rC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7726,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcG86iCRA9TVsSAnZWagAAt/kP/RVQ35mfuvT4SNZyyEZm\nEgXMa2MFYNzw9DcSMwO91jwr338YKWUc/gy02+dbkEQmQsKivJdW3UcJzzSn\nuo8n01WX9PRjWLBAjdCvIU0Nh7T2n5BNwfbINvHBQRp6TxUUbt7FeKnabnzc\nLP6pmGnXdCGrrWCgUXwPBl5QbTxIlwRQY31V+Zz7MWcY0U5sXZ75N+r8KaKP\nryeJ3WVN+H1DNafxgsZbfBSTQzaXNEl1wlNv7q79WttzmqQMq82mTgk/xuBH\nCLK1zopm3lrCsooMT/06SDGaSsl6r3jUA1Uqeqmf+RmaFmvC8YJj4LwiN+er\ncPNsZMzT6dKMj3mbgEuYkt8BhQhA5kMwHCBMlbon9lk9K3fZaaIBaN6766YQ\ng/lERb2lTnoNod8VrEET7opHgz9Xqwzuc1EATGM7gOmC+zVhyD7urmC1HbdO\nQKTawDoYE4aQRen4eXyVu/XuUgUw9TjmUShL1OEEppXpTkl2miCzCMR0qcD+\nrpq3CAb13xwHqtNrBvQK5/VhXbbdx8m1Cppi8UQ9PEMLez0OkXEu7/2fzQOF\n+Xnj2DuZkUzLAIovSmEjdILb9Vk/N4tzFh0nP04lb+f5NetQik4KhVO9m4ub\nO6XHA3/fZcKvX9chRbqCv2bN4byArFsgLDPOYkhvWObNUERyx69UBjKyDAmF\n2Nl/\r\n=TTRf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4a5fc7c0930ce90a03e052cd285409080337ab68","scripts":{"test":"standard | snazzy && tap test/*test.js"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/mcollina/fast-write-atomic.git","type":"git"},"_npmVersion":"6.4.1","description":"Fast way to write a file atomically, for Node.js","directories":{},"_nodeVersion":"10.14.2","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","husky":"^1.3.0","snazzy":"^8.0.0","standard":"^12.0.1","fastbench":"^1.0.1","proxyquire":"^2.1.0","graceful-fs":"^4.1.15","write-file-atomic":"^2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/fast-write-atomic_0.1.0_1545326241844_0.47385004063135616","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"fast-write-atomic","version":"0.1.1","keywords":["file","write","atomic"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","_id":"fast-write-atomic@0.1.1","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"homepage":"https://github.com/mcollina/fast-write-atomic#readme","bugs":{"url":"https://github.com/mcollina/fast-write-atomic/issues"},"dist":{"shasum":"ec432f91b5a5cac83147dc8050404ceb40e5a243","tarball":"https://registry.npmjs.org/fast-write-atomic/-/fast-write-atomic-0.1.1.tgz","fileCount":8,"integrity":"sha512-srwZ2A+Dg0D0tQE53PcUgD0fm3QFaRB1oNc2Qs5sQ/OUCQDVBBTsGqDSa36tv8RD0yU1vdX+hLHA7FZ+Y9M0ew==","signatures":[{"sig":"MEYCIQCdBpNPojlMPXez9Qf7n55CjcdIXQDaW+gzJSZfI1ncpQIhALh4ALGJXO1SGAe21Y/2vp9CB3RmCC2ub+HnLkIO+S8e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHMdlCRA9TVsSAnZWagAAw6cP/2rRoquiEg9sSizNflOJ\n324PBn7ulJB0SE5fRSGC0+ahCCFisNhouJNi01EaHyjW+UzG7ZeKJVZRC/Sm\n0oOyrOszHrUAfgp5CKwDHP3Zg41QVJT8eSlZtNn0K+NUfwGXnRwocKVavPsy\n8lVU+OjL0iZHd/+4NtUsMXcqh9zxLIB14OGJjM2CIhlwIlfDFGwGO5mukKde\nO+LRaNeGwvPQC88EgUf/UzxgpqdtuhNdc5IwjKuZGrlg7E1Dn6ELSKnv9Co8\nXm/eI5iL01zjjGJmgowkCudkBXm6lN5cSZv8pdvknINSaKEP1NHC6vhHj4HH\nZDUO/b9WmG98OZFjm77fmCVS/7U9P+gfG06xh/pKJPe2UH4Vf1lubL+Azj3w\nd1OYfzJH/DIpo/JeObAiZBb4TG5VMYycTefzBKx3FfTwA6DtiHBWTmGvkt2V\noRFS1SXK7Ixd67dUtVoLKib3PE87FUHy5bhG6SgjkQXjbMGO/3cAoaExpdbG\nJwPa8ye64v8ATzbB4D0LKu977Ue/NFM52bWgMGDfClCGja3vpQSO9GrJdLTV\n8O3IoVyV940PQi613Lc859KTbM0x1M3J6k4xFITwvqVl7qv7EWxve5b3rzbc\nc9kc/NxbfysTSpIRylt2F1ZoWjIW097i9iyqV53A7bzctOw8qM1ZXBbPAJtK\nhHHH\r\n=P2/X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","husky":{"hooks":{"pre-commit":"npm test"}},"gitHead":"424dc5812b311f0a418d4e7499f6d5368decf273","scripts":{"test":"standard | snazzy && tap test/*test.js"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/mcollina/fast-write-atomic.git","type":"git"},"_npmVersion":"6.6.0-next.0","description":"Fast way to write a file atomically, for Node.js","directories":{},"_nodeVersion":"10.14.2","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","husky":"^1.3.0","snazzy":"^8.0.0","standard":"^12.0.1","fastbench":"^1.0.1","proxyquire":"^2.1.0","graceful-fs":"^4.1.15","write-file-atomic":"^2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/fast-write-atomic_0.1.1_1545389924446_0.34161127967906313","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"fast-write-atomic","version":"0.2.0","keywords":["file","write","atomic"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","_id":"fast-write-atomic@0.2.0","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"homepage":"https://github.com/mcollina/fast-write-atomic#readme","bugs":{"url":"https://github.com/mcollina/fast-write-atomic/issues"},"dist":{"shasum":"76ab0cf9fa0095a790763039bd57bb2e4f599fce","tarball":"https://registry.npmjs.org/fast-write-atomic/-/fast-write-atomic-0.2.0.tgz","fileCount":8,"integrity":"sha512-0aavsEg6PMSkVedGj+W03z/fSlU2JQbhSqU6SZBFXsLdyQ+sxwIF/MvlDJk6t60USWrpsGPu7ooURWoKQYRlrQ==","signatures":[{"sig":"MEUCIErmGa/sA2cEVzzU2AsucFQmIcmEEQW4ZS0M7QQ7XRmNAiEA0mssdpGRGO/F33Yj4GCltoXTwf+5/+RIb/ES584kP+Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcL3SQCRA9TVsSAnZWagAAZWoP/1mxyw2FXkFCxyMnPtMO\nN7xUcCUQP5Xafdwcl+pPkdDcDrXRBRowEZqcm6+XyOcLX7OkWBURbnCwaSxb\nWUuM8HQgubXXUgiHdmoJ9ZJMd35b3yC/zdNtFyxZ8GOEMk0ZJ9aBL7wQ4wEO\ns5IkvhdGJ0124rP7TZOx8Cgtj2Nv4VkNOz2aJ/gwKf6EKff7Na5vFGhJeGdd\nTnkSRzy96HqrEvcdVD6DRbIQKJakBCvFTAPQN1tOt1C5xJAnyMhAX+BUYnEu\niVHhrmOMzHd7K29M08pGwt5KeTqK51eSOJ8d+qgO9JY/PgKJGEgu8YMm/zRa\nrWXUZmA9cn+HcHQihry6Bxkf2lqHNmaWcJSss4Vs3wkSsNdOzrTzOr11Cl/3\nUR0N0VnbGmwzI7Vvdo6zrs7xzJUMrOncsdpEQ5gED3YriVMmZNrC8jzUv3Lz\n1QVD1eqVw5BjX1q5+xSYxnEM2dwY1o+C//ORyKGA3Teei3oWH7pnh1PHQnTb\niyQasnFqf44TLCtAVbT7KzT4joGiz3ypy8sJqSuAwIwYKq0LhAGtM5C2IsLC\n2O+CmhsAujhnXygNq+YJrHlSmu0ezHR9cpYz0Q+4a81w/bxJWmqmxr7Cn3U8\nOrmEl8/7zCGQYOo6n9PbJrk8Li2kCQVAcr62woFs72N3Q3nAzYVDYgplH2dF\nrHU7\r\n=51nL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","husky":{"hooks":{"pre-commit":"npm test"}},"gitHead":"ab82a19dabf169717b8ebf241ca539b24e023dbf","scripts":{"cov":"tap --100 test/*test.js","test":"standard | snazzy && tap test/*test.js"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/mcollina/fast-write-atomic.git","type":"git"},"_npmVersion":"6.5.0","description":"Fast way to write a file atomically, for Node.js","directories":{},"_nodeVersion":"10.14.2","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","husky":"^1.3.0","snazzy":"^8.0.0","standard":"^12.0.1","fastbench":"^1.0.1","proxyquire":"^2.1.0","graceful-fs":"^4.1.15","write-file-atomic":"^2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/fast-write-atomic_0.2.0_1546613903487_0.3697111475508974","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"fast-write-atomic","version":"0.2.1","keywords":["file","write","atomic"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","_id":"fast-write-atomic@0.2.1","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"homepage":"https://github.com/mcollina/fast-write-atomic#readme","bugs":{"url":"https://github.com/mcollina/fast-write-atomic/issues"},"dist":{"shasum":"7ee8ef0ce3c1f531043c09ae8e5143361ab17ede","tarball":"https://registry.npmjs.org/fast-write-atomic/-/fast-write-atomic-0.2.1.tgz","fileCount":8,"integrity":"sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw==","signatures":[{"sig":"MEUCIQC8avjOwRMB3E7KgMfiSAC2XGJguTpNey0CPpwa/U5UiQIgUu11IxL7f9di2L+xVXVurIT+yry57PH6UK8RcKNJMLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12351,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcglzxCRA9TVsSAnZWagAAN7UP/3tgq/lPuw2zg5pIsonn\nYl7+LNBFip0o61uDLonrlHeL1Dqwh/mdUe7jfEICB20O6KG6MxFNsq4oEZm5\nR4URUiJAZPelYFCnSax3M0riJoO+HxJSPORLzEI5yZudSZJGH1COg18pMyj0\n6uRVbVO0HMOqJWwC3dNWL5b8sOURm8UIwIz3lXoFpUvAuRbjp33sAcW4t38Q\nBZRvYFyrnPwSHRJwNHL6gWITRuZdtOp2Fs1K8VMr3cM91n2a5ihkNya28/ei\nu7tinLAjNy6Zc2ZdcV9dyOliYWKi3zXuL2cqxRCLHhBT9m38HL3IxzSzrouL\nmjkUyH73avPeeBEP7mDhCHRWfKfe1yCieNUPbP/pgJody/x4jrHa2iK3tAb+\nYSc4PZqQZ+yC2jGAkY9wLEb1IzUYTxCXYUhbglljnnKVFVtXxDDHZXnbMuBL\n2cXFgZaSgh1zFkXEJ+mnZsu/8XLrVBuVgN84d4mKkaTzzvtW3xBLwWMjRQFv\nROziK86NrfW6W6iMvCQt7wWYtd4k9DOUUH6VnHO/afoi3k1EYEeeKh/s0Gt4\nmabPYQ5JbE0Zg99suOwTLmxlBqBaCCJcb44v8ghnwwbjA9aJiKSJ16vDYNsl\nmalNk+6VCBdYxtIPt4J94HKKyqrAhhmMw3WTTkTac7mH962lcctIcNMZHAht\neico\r\n=Bxe9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","husky":{"hooks":{"pre-commit":"npm test"}},"gitHead":"162e4e7028a6853aa1fb79829160e6df80524159","scripts":{"cov":"tap --100 test/*test.js","test":"standard | snazzy && tap test/*test.js"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/mcollina/fast-write-atomic.git","type":"git"},"_npmVersion":"6.8.0","description":"Fast way to write a file atomically, for Node.js","directories":{},"_nodeVersion":"10.15.2","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","husky":"^1.3.0","snazzy":"^8.0.0","standard":"^12.0.1","fastbench":"^1.0.1","proxyquire":"^2.1.0","graceful-fs":"^4.1.15","write-file-atomic":"^2.3.0"},"_npmOperationalInternal":{"tmp":"tmp/fast-write-atomic_0.2.1_1552047345073_0.010335729515421832","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"fast-write-atomic","version":"0.4.0","description":"Fast way to write a file atomically, for Node.js","main":"index.js","scripts":{"lint":"eslint .","test":"npm run lint && node --test --test-concurrency=1 test/*.test.js","cov":"node --test --test-concurrency=1 --experimental-test-coverage test/*.test.js"},"engines":{"node":">=20"},"repository":{"type":"git","url":"git+https://github.com/mcollina/fast-write-atomic.git"},"keywords":["file","write","atomic"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","bugs":{"url":"https://github.com/mcollina/fast-write-atomic/issues"},"homepage":"https://github.com/mcollina/fast-write-atomic#readme","devDependencies":{"fastbench":"^1.0.1","graceful-fs":"^4.2.11","eslint":"^9.20.1","neostandard":"^0.12.1","write-file-atomic":"^6.0.0"},"gitHead":"b918e79e66c7c0da6af1f9efe919023b34c1988c","_id":"fast-write-atomic@0.4.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-O0AGqOsuOgsVXFiF/vIm7c+NHRZB6c6IDMBVPWc8rLGWVW7FYaBBfzhqxKlKyGKVF5tPR4drUOxE02lDiWjbSg==","shasum":"cf083071d1ba868fc4b3d78e5f157bfabc7934c8","tarball":"https://registry.npmjs.org/fast-write-atomic/-/fast-write-atomic-0.4.0.tgz","fileCount":12,"unpackedSize":17533,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDMRrEXQ7iD7E6VzXtZL81JMe32V5basZfDMcFjCuFqfgIgE2J+SkIy9wMVOiUvJ1D75UvGM8akhMID5K3iGTMpqJI="}]},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fast-write-atomic_0.4.0_1770986035337_0.26206660103120827"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-20T17:17:21.843Z","modified":"2026-02-13T12:33:55.592Z","0.1.0":"2018-12-20T17:17:21.965Z","0.1.1":"2018-12-21T10:58:44.701Z","0.2.0":"2019-01-04T14:58:23.643Z","0.2.1":"2019-03-08T12:15:45.186Z","0.4.0":"2026-02-13T12:33:55.490Z"},"bugs":{"url":"https://github.com/mcollina/fast-write-atomic/issues"},"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"MIT","homepage":"https://github.com/mcollina/fast-write-atomic#readme","keywords":["file","write","atomic"],"repository":{"type":"git","url":"git+https://github.com/mcollina/fast-write-atomic.git"},"description":"Fast way to write a file atomically, for Node.js","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"readme":"# fast-write-atomic\n\n[![CI](https://github.com/mcollina/fast-write-atomic/actions/workflows/ci.yml/badge.svg)](https://github.com/mcollina/fast-write-atomic/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/fast-write-atomic.svg)](https://www.npmjs.com/package/fast-write-atomic)\n\nFast way to write a file atomically, for Node.js.\n\n## Requirements\n\n- Node.js 20+\n\n## Install\n\n```bash\nnpm i fast-write-atomic\n```\n\n## Example\n\n```js\nconst writeFile = require('fast-write-atomic')\n\nconst data = Buffer.from('hello world')\n\nwriteFile('./hello', data, function (err) {\n  if (err) {\n    console.log(err)\n    return\n  }\n\n  console.log('file written')\n})\n```\n\n## Promise API\n\n`writeFile.promise(path, content)` returns a Promise and keeps the same atomicity behavior.\n\n```js\nconst writeFile = require('fast-write-atomic')\n\nawait writeFile.promise('./hello', Buffer.from('hello world'))\n```\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run cov\nnode bench.js\n```\n\n## Benchmarks\n\nThose benchmarks write a 1 MB file a thousand times:\n\n```text\nbenchWriteFileAtomic*1000: 9830.501ms\nbenchFastWriteAtomic*1000: 8848.916ms\nbenchWriteFileAtomic*1000: 9944.722ms\nbenchFastWriteAtomic*1000: 8997.108ms\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}