{"name":"@parcel/fs-write-stream-atomic","version":"2.0.0-nightly.2144","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":"71264fe1af27c6eec127fe8fa3241dd1a2e6c029","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.2144","_nodeVersion":"14.15.1","_npmVersion":"lerna/3.20.2/node@v14.15.1+x64 (linux)","dist":{"integrity":"sha512-XZl3nz3B7LoowXitf6vyh9Gc3M+Rex1MtDXWu4cIhdLyR4zMQ+KeH+vUG53YHMokGhh9n7ohMFTcITCRXpioKQ==","shasum":"bcc9185999f3dc5392e62a732bc6dc4ede71f66c","tarball":"http://registry-npm.ywwl.com/@parcel/fs-write-stream-atomic/download/@parcel/fs-write-stream-atomic-2.0.0-nightly.2144.tgz","fileCount":14,"unpackedSize":20032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+Pq8CRA9TVsSAnZWagAAy2UP/3OVYWZV5HAS4RszKnvJ\nJeWFFYPbqg02E36fPM8vLG1CX30r1ofWZyFoqbVpB+RfgQFrQeaQEQ5vKg6e\nJzi7pJmJhNLW6arXm0l7CWH/NMd5fAuYKd7kEeSH9VuPSBO0Q7rI6YbGANDL\nm4SVSN1GoIjbgcU+HpZ2AHtx+5leRToTDGtalD14zo9tuIUJNE0iquqWhtfb\ntmfmuEJm3L9khVEYqPG2wNDCtSD076g3NenS45NGoR8pOsISjkqC6KS6kvS3\ncJpk0XYVypz2joPemTcptK2ICeW8ainlxntI2XteYy0sL/ejriL1qU1yXBe5\nKm6ngCrYXfhS9ycAqOMKJ6ozV1xdYB2f4ZXtmzTlkyj1Q5Nbp1rfm8fS7LAI\niWzBujpsjmOd5CPTEmy6LR3h3L1aUO+cKK6cRX7mB8daIpE8z5LYgV4A/BwH\nj9dRBzl+NbwqpxBnkCA/YelxohpwGtlUAnzFfUKEf6wziVNPU/HnAOx4r6ds\nxk28nzHcqjvMCCDidysAPioYELht3bMaGQiPPpLpbHQ5o8/NGAt5bYA8XL01\nvwwWHTki7Lxx5BMC4vRpkYFiKpm8NQ7UUbHYgVb2lUq9y3PQIANXuJ7wztlK\nGmFBV1I0ciLUeulCxmncDAqjkHZRvNBm8s7HRVpHxK7yxRSGvt8xITSqYmhL\nQAoQ\r\n=RrxB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHKcKZZCcgIxt3iwQq0BrEZ7/0nh647lbSRRJvDdPJ+BAiBQ8vJnsnL0AktWAmL9mVdNONeBjxxW2BbN47dpKo59AA=="}],"size":6024,"noattachment":false,"key":"/@parcel/fs-write-stream-atomic/-/@parcel/fs-write-stream-atomic-2.0.0-nightly.2144.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.2144_1610152636010_0.0934704146206653"},"_hasShrinkwrap":false,"publish_time":1610152636494,"_cnpm_publish_time":1610152636494,"dist-tags":{"latest":"2.6.0","next":"2.0.0-rc.0","nightly":"2.6.1-nightly.2740"}}