{"name":"@parcel/fs-write-stream-atomic","version":"2.0.0-nightly.2266","description":"Like `fs.createWriteStream(...)`, but atomic.","main":"index.js","directories":{"test":"test"},"funding":{"type":"opencollective","url":"https://opencollective.com/parcel"},"publishConfig":{"access":"public"},"dependencies":{"graceful-fs":"^4.1.2","iferr":"^1.0.2","imurmurhash":"^0.1.4","readable-stream":"1 || 2"},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","gitHead":"737b7ec5e6e4629566f2861c67b974e31a7b69ad","readme":"# fs-write-stream-atomic\n\nLike `fs.createWriteStream(...)`, but atomic.\n\nWrites to a tmp file and does an atomic `fs.rename` to move it into\nplace when it's done.\n\nFirst rule of debugging: **It's always a race condition.**\n\n## USAGE\n\n```javascript\nvar fsWriteStreamAtomic = require('fs-write-stream-atomic');\n// options are optional.\nvar write = fsWriteStreamAtomic('output.txt', options);\nvar read = fs.createReadStream('input.txt');\nread.pipe(write);\n\n// When the write stream emits a 'finish' or 'close' event,\n// you can be sure that it is moved into place, and contains\n// all the bytes that were written to it, even if something else\n// was writing to `output.txt` at the same time.\n```\n\n### `fsWriteStreamAtomic(filename, [options])`\n\n- `filename` {String} The file we want to write to\n- `options` {Object}\n  - `chown` {Object} User and group to set ownership after write\n    - `uid` {Number}\n    - `gid` {Number}\n  - `encoding` {String} default = 'utf8'\n  - `mode` {Number} default = `0666`\n  - `flags` {String} default = `'w'`\n","readmeFilename":"README.md","_id":"@parcel/fs-write-stream-atomic@2.0.0-nightly.2266","_nodeVersion":"14.16.1","_npmVersion":"lerna/3.20.2/node@v14.16.1+x64 (linux)","dist":{"integrity":"sha512-Ca6I3YDynhfXSria50tAKbpTZFNn52EXjngPjfRYgaaDW9djaKXLoDEZ3J0tN6R/QxqF+Wiujuemtu+Vch5Vvw==","shasum":"5d58b4d8bb9152f2537008fdac22df6565c4b553","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.0.0-nightly.2266.tgz","fileCount":14,"unpackedSize":20030,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeifyCRA9TVsSAnZWagAA/+8P/jq5dGgBROtZSemC1Sg7\nYHLYi4CEuZN2IDy4RLh4fdCXXngA6wNFZGnTK9qG9u/31Jv8F4Fv+0uaokmv\nHoNT7moppR455wZovmyuEKU2Sk+DiXdCogGQPMDCK3q087bYeUkonQ2C/rmI\nGeRM3GGzqfEw/1sxc/bleylvDgQ1V6K0cCL0+3O1sVvbOSAAVRpgpnu3g2s2\nkgqRstdcwm+l6PBrTfNrZeOZWkVqFaNdzE5piSBlWJXOwN0bD5iUg2REBg9N\nwJJi9SkLK298WI7nhUDSVKCM6IYQzn8+t5MuqOiW8zLQXKTswcQW7A1iNlLZ\nm53o8L2NL6lWCuWTktXrIeYqnTXOwGC1+7VOxfJu0ZH/6JH8AfUaliF5QwWn\nnXt6eWIimuhiIrskp28TDhL4PTJT/sjBPumf6zR9yG4d6o8ZbLdydxkGcUh5\n5TsR8AsZCSoU2vbLU4rj8tt3BnpOO52ntAHMhH1qLdjRLeOf1ix/5wPwfoZ/\nVAwGKGDawcMoT/O3aucjq++i68GZRyInLUm0Q+jcaLBGs/XO4uMD6tM30Ccx\nkRMxEyUx+PLK1bU9Oi9fXhfuStHdWES3cG9GngEZFaum6L1Os09fLK2qKF85\n1R0lZHX3K2N8q2iNQD4PydN61U3uIOVESpnYjJWzL6N/iHLmBCwO9KKaUAIh\n4+YG\r\n=B9fo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmrf0iuogaB9+Ef3vq9VpOw8iOSBWAVU/PohVwhvDvzwIgJC92xFfls9KBsbnrYwRDR/cMhpJLi5HVWeCX99Hh6RU="}],"size":6022,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.0.0-nightly.2266.tgz"},"_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-write-stream-atomic_2.0.0-nightly.2266_1618618354124_0.08258954768153481"},"_hasShrinkwrap":false,"publish_time":1618618354253,"_cnpm_publish_time":1618618354253,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}