{"_id":"fs-safe","_rev":"5-9f824645400d1baf99a64b4b46262277","name":"fs-safe","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"fs-safe","version":"1.0.0","description":"A simple fs wrapper that doesn't throw","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/fs-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/fs-safe.git"},"keywords":["fs","safe","fs-safe","read","write","remove","watch","exists","dir","file","directory","directories","files","recursive","throw","without","try","catch","simple","make","executable","error","errors"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"dir-exists-safe":"^1.0.1","file-exists-safe":"^1.0.2","make-executable":"^1.0.1","read-dir-safe":"^1.0.1","read-file-safe":"^1.0.9","read-json-safe":"^2.0.2","remove-dir-safe":"^1.0.1","remove-file-safe":"^1.0.1","watch-dir-safe":"^1.0.2","watch-file-safe":"^1.0.1","write-dir-safe":"^1.0.1","write-file-safe":"^1.2.2","write-json-safe":"^2.0.1"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"fs-safe@1.0.0","dist":{"shasum":"afd2b3499e745293717126f74a30ab2cc2014555","integrity":"sha512-TVKVdqAaXdFDvekBGeuRRqZ9/tAcBnbKxeLmHmIFd80LJ5Tf1wASeeO67ooRBj1Iqfx2J0qdMO3GCeUx+GkWww==","tarball":"https://registry.npmjs.org/fs-safe/-/fs-safe-1.0.0.tgz","fileCount":7,"unpackedSize":17496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfeg6CCRA9TVsSAnZWagAAOLcP+wU8JwUt++PEqdZhds0u\ndah6HrYuGYN1bATcc8/maJS5Li44UDsUTUOvyfeShD+3uFqPniyFHC21NVe8\nDjAtvLbvbb1HLe6n0Vd2w630858Hf4lON5spY1SE+/WOWwRT81uRlyODkYtV\nB6bkCbNkQgIH6KiNTmOgXu8sh4cXjUyU2zg1V3XfzqPA856psVH6IFjQVos2\nfMT3CbCW9jocFRRr9y0rCnaah06eKy9TSLECwoNZS1trbWQiCQE/SuFNYNSj\nW1nSNx9UQa467yZTimH5jxoeapdbivXIMv+00JhBB/b1RDxqrXURlkZH3HJT\nLC3dRS5ogMZCCJI//OuOKgSGPoUF0RYp4sQ8yuc4er5goVb4poxqHwGd2gwW\nyEjfocATUhE7WNbx4jKDS5sujINi84vPQtWtHT7OyOaY9CzvvSyzygvb3N9V\n5VuQViFlEjpsIIKPKXlXrDqqsiaCnp5SnGUciSRs6+AAB0I9uMdwwdI4lBvg\nrV5VmDIF639EAK+cFibqgJWc0Ab8Ae3c8ENbQWT/NR3xIUTW/Z1EZ306Jecg\n3mf7lfk2BzZvN4eMFNQjQRd9HraTyjHKF1hjrjHWePabQDtvvVmoZ/E3Q/No\nBl0hU59eUQdW2FRt5+9IHhd5J6aw11YoOTpnnjF5lXLzZ0TpEn0/Rzlg87yg\no60p\r\n=lV1S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGPXs4gm3GvLM33OJywz1H/8fJjj90Sl9GQiAeD8outAiEA+NKTvyUfHpevcN5hbF5gBkd702mRclqfhVjrOsyNhxQ="}]},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-safe_1.0.0_1601834626414_0.020654325993329392"},"_hasShrinkwrap":false},"1.1.0":{"name":"fs-safe","version":"1.1.0","description":"A simple fs wrapper that doesn't throw","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/fs-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/fs-safe.git"},"keywords":["fs","safe","fs-safe","read","write","remove","watch","exists","dir","file","directory","directories","files","recursive","throw","without","try","catch","simple","make","executable","error","errors"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"dir-exists-safe":"^1.0.1","file-exists-safe":"^1.0.2","make-executable":"^1.0.1","merge-json-file":"^1.0.1","read-dir-safe":"^1.0.1","read-file-safe":"^1.0.9","read-json-safe":"^2.0.2","remove-dir-safe":"^1.0.1","remove-file-safe":"^1.0.1","watch-dir-safe":"^1.0.2","watch-file-safe":"^1.0.1","write-dir-safe":"^1.0.1","write-file-safe":"^1.2.2","write-json-safe":"^2.0.1"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"fs-safe@1.1.0","dist":{"shasum":"152f5abd09052debf0180b8fbd8e9800eee42410","integrity":"sha512-lpnCGJ3fhCYRLJBIYaglIeUiFFDT76kn0pCwIqO1EkOHzc/StiTyQ5MvbcodSW+t59qhZ9Ga9Tfw2umg80+7TQ==","tarball":"https://registry.npmjs.org/fs-safe/-/fs-safe-1.1.0.tgz","fileCount":7,"unpackedSize":19148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfenZVCRA9TVsSAnZWagAA5KcP/ibkUaz2j5cRO/H13Za5\ndR41dOlW/nwVgGB2GQCQZAwmKFhurf0f+F4rUFVi44fPydN4z+shlcwH21bZ\nJYGFevgY6rBF0vA4vXk9sNgXHNFoTnpEK6nyy1bnUJARqq5o1i0peLDTV3ta\nDqccUbHwSGY9oQZZ/NTZ6voUWAsho55lLqiUJF86/3fFaEwfVnpzEAJEvB6e\np5hoqfIyzzMUayfntTv2yu0BJjkdM/tGXFxqPvRmK66MYyGegMhtjDaYylSc\nY7NJAOOjXcLurclLs6qFXWa8iUrx5d8521dQI5dBczB5kMGrdj6ITOyw5ymI\np7Kqvf8PbZ+EAGSUUO9LTnRKS5YCIXJLzStbnpOJQSAmO/lIF+LwaxdBoLE+\npvaI5N7VCYIk15kEQzKFATWfTL9Og1utSZfd9Uc1hdegGwqnBHpYaDa5rNRq\nRCzzy/CSn5vBe75w/TshYaSatKMsxAp8ss2lZJ9rmFpgQT25FT6+xYKVKM4Y\nDg8q088iMDIbgaUfUe1J5MWajuF9faUghsw4K68Qq+EPPZRC8ZKYZeQaF0bp\nfdEKoEEcaKQtWhAbFKu+P+Hmluym4hrlFyl6gBLV7mFXJixYswF/fWTO8HfT\n/aJ/CLkBUjoBt7HLbJsCof81LEcVOoQwqF5E2GovBKpFbAg6QjU3hwjHLsle\nWVWN\r\n=U0jY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwW9OyoHCNWgJPZ2B7YsYw3VYd2p5jxxnIh0Y2/e+f/AiBEGu3nQ/LYJOhPjHS1aWRPjLp0oPVLBr3+H1th1m7xaQ=="}]},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-safe_1.1.0_1601861205166_0.20462208993789988"},"_hasShrinkwrap":false},"1.1.1":{"name":"fs-safe","version":"1.1.1","description":"A simple fs wrapper that doesn't throw","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/fs-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/fs-safe.git"},"keywords":["fs","safe","fs-safe","read","write","remove","watch","exists","dir","file","directory","directories","files","recursive","throw","without","try","catch","simple","make","executable","error","errors"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"dir-exists-safe":"^1.0.1","file-exists-safe":"^1.0.2","make-executable":"^1.0.1","merge-json-file":"^1.0.1","read-dir-safe":"^1.0.1","read-file-safe":"^1.0.10","read-json-safe":"^2.0.2","remove-dir-safe":"^1.0.1","remove-file-safe":"^1.0.1","watch-dir-safe":"^1.0.2","watch-file-safe":"^1.0.1","write-dir-safe":"^1.0.1","write-file-safe":"^1.2.2","write-json-safe":"^2.0.1"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"fs-safe@1.1.1","dist":{"shasum":"3df0ef8d159eb27511c1dd02adb8f398f4f28078","integrity":"sha512-fq0Z8m8RFLIH7NNakqCm2XUVFNOvwAzDpjYzLxRI6k4sYu0OyAVTqcgu3PYAqUCsfzqqyqLsiBR7CP8edHJCzA==","tarball":"https://registry.npmjs.org/fs-safe/-/fs-safe-1.1.1.tgz","fileCount":7,"unpackedSize":19379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfenayCRA9TVsSAnZWagAADRwQAJoJWX05Ipku57ChH4no\nh0isUYCFof5UhDhbmRHu6CU5E4/IokVrJ1bXLJ7aqnP7gzaec5Efz/NTFS/u\now7DjnezY8J4y+D2frk5H9qGI+oJbFEENijgkXFJtOVSj48s43aXPYh/OTrF\nWQM5ai/lm7zIv5qf5SKsH2jbAl42q75f7Ldhq9gLjB+7jDyeJBqj58zzUPlf\nQg6zQHxFpaGxUB+M7WEziIQ0xJ1oNbZpXKkajxlB40UEdDe2EhjBfaaW2gi7\nOftnzR0lR6S/xAHv2WsgmjYu6StdGCfDxDECdfomYRhwcnFnEVZWSNDkdITS\nD5kbQ/UPCHc7kw4R0czqmB8f+IGMAnH6z4y3HwIgMxonQv/SuZk23LQFT3un\njuYiCU2xI0Y7yPSl3vf4IOj23cyd24FP8v28NlG09UJfOzQouutFVdxnyDSG\n6wgj3QGkvU+3ye1pEcqZAF0ge3kqZB0dGnNmqhdcstXhLNzoXShQg7aXk+ON\n9uI9YF3lomaAMOTWULKRP4V8fCfL7ugom4lmDiNqsI4IpcTE1TQsyNm5vTyA\nz/TAZ4EZMOC9GP2lHnx6N11gWE7SnYQ0XY7NCSrOw98H7NESPt+HEiI22eCI\nej2CIGoON9Ox26nEYg+kYGEAytaKFhtHAPd5MxdxYhraqxJ8KZI5HvMKwMbw\naXw0\r\n=m9tV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHV6c/DbrNi2JBUGal3vFuKxVyqz89foI2nKCFutWXF9AiBvDcUFWVhUVi+5k4RO+jlt1EitOg+l2tgpRG8ssQyT4w=="}]},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-safe_1.1.1_1601861298015_0.3327158793084781"},"_hasShrinkwrap":false},"1.1.2":{"name":"fs-safe","version":"1.1.2","description":"A simple fs wrapper that doesn't throw","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/fs-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/fs-safe.git"},"keywords":["fs","safe","fs-safe","read","write","remove","watch","exists","dir","file","directory","directories","files","recursive","throw","without","try","catch","simple","make","executable","error","errors"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"dir-exists-safe":"^1.0.1","file-exists-safe":"^1.0.2","make-executable":"^1.0.1","merge-json-file":"^1.0.1","read-dir-safe":"^1.0.1","read-file-safe":"^1.0.10","read-json-safe":"^2.0.2","remove-dir-safe":"^1.0.1","remove-file-safe":"^1.0.1","watch-dir-safe":"^1.0.2","watch-file-safe":"^1.0.1","write-dir-safe":"^1.0.1","write-file-safe":"^1.2.2","write-json-safe":"^2.0.1"},"devDependencies":{"@bconnorwhite/bob":"^2.9.2"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"fs-safe@1.1.2","dist":{"shasum":"59643b101a227cf1f8f9536dbf44e5bfe8c32d8a","integrity":"sha512-FfbUYPF/xiXc62cS9qi6ExCFqVK5KcSFYblJfuBhQFo9EFQmKUZ7Op9G5ZUxW0X7+Oo3+wOu0yQ9/fcbHXfyiQ==","tarball":"https://registry.npmjs.org/fs-safe/-/fs-safe-1.1.2.tgz","fileCount":7,"unpackedSize":19722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfenkQCRA9TVsSAnZWagAA+FcP/3PRZRqqG4eSyYwHzzsU\nQCEhnA/J/+05LZIhqB5G1jd9BNSi66DA103atSFiXVB2OdVbv0q3HIc5zW5P\n4y9q9e1ozpFZxZ3n7Jl7RUyI8YgiA18SQfTc+HZVnBbTPMrbw8kUqYaNaQFM\nLuq5zH1Aa4WW7F27ntXxACFlLVaoMpRGigyrNokOJx++oqxczo9LF7wTG/GB\n5jXI1a4IAYsvUxt6vzcmFBUq7L2BrB6T0AyLoaPFh42ACI5JMR5Tz2zyy0Lw\ngGQ2WVKiw5VqhWycejGk7LmPM4Y3wk4cOVewA9U/eTEDOiDYIayUzTbgbKYa\nqsR8zhOoRGxfiPZqQ4tmEMuEVD5/JqnzylulGsAdm/TaEUUrIvYs4Zn5BzDu\n0aSkYCokvbYvM7tS5AcknLosXqUpLZw2GgvHyZJzVpvQfmY2hANTpvMOMPAf\nCX1V4pfZnuXAFW4cCvuov0DrUZCB0g6pFQM+UZfcJ0qpOBUj7xCHt0wp9EMz\n8B5gm7WoabUZjZ/k5NgHAazkkOOsYyoWOZCi2x5wUI+tDUKlfIvSdyxEpGor\nHrLZBxTT8bmXr2I+7xO9qIqsbv0+QNvbUFZj4sUugxpi46Y5QaKCFn2yy1Fj\n0Cy4l5H+e/rWmex58rP7RXmzRSmJGQQw/zunyH+KpQG0evswfNdfVVCtPUFb\npKfj\r\n=tFlT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6Lab3tOcJ2L6PDM7xUxTEAFi/7X/w57GOgNsxtXiRcAIhAIOBYK7ob4yxkrtkvlZ+aN4o14rzZypUhl2MNtweHaPu"}]},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-safe_1.1.2_1601861903768_0.8971367378842869"},"_hasShrinkwrap":false},"1.2.0":{"name":"fs-safe","version":"1.2.0","description":"A simple fs wrapper that doesn't throw","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/fs-safe","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/fs-safe.git"},"keywords":["fs","safe","fs-safe","read","write","remove","watch","exists","dir","file","directory","directories","files","recursive","throw","without","try","catch","simple","make","executable","error","errors"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"dependencies":{"dir-exists-safe":"^1.1.0","file-exists-safe":"^1.1.0","make-executable":"^1.0.1","merge-json-file":"^1.0.1","read-dir-safe":"^1.0.1","read-file-safe":"^1.0.10","read-json-safe":"^2.0.2","remove-dir-safe":"^1.0.1","remove-file-safe":"^1.0.1","watch-dir-safe":"^1.0.2","watch-file-safe":"^1.0.1","write-dir-safe":"^1.0.1","write-file-safe":"^1.3.1","write-json-safe":"^2.1.0"},"devDependencies":{"@bconnorwhite/bob":"^2.9.4"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"fs-safe@1.2.0","dist":{"shasum":"1b2606bf546914bc4f192a7b1bb2137f775a9d6b","integrity":"sha512-DjPOM7n63/nCdeTXDE4Q29kZNOY/wQGpUuESzdOKRVmkAzNzzoQmgFLFi4fNNp0GAwOhN17GsQs4IEAjp9CttQ==","tarball":"https://registry.npmjs.org/fs-safe/-/fs-safe-1.2.0.tgz","fileCount":7,"unpackedSize":20788,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdaTPCRA9TVsSAnZWagAAWNQQAJd9kwI9mdU2+lZb64qy\nMVzbjn/9ZAFHzuvXynEhyfVQ6JoTywxPmNnHPyR7gVAhzJUEZ/BX7chQJHBz\nH0X8pLen7fi469JsHWaVRNnRozNmF24vHBQ/Ym8UVlV8pjzaHFlMuqW7fCsE\nFz4/7QeXYtkY8zs2g7gZkfKOtI8fDhdVC9cGC0BrivNvsw0iAGQogqzVLcSJ\nyydOMUY+uAyI/yXpz77hYqarHfEfU28riHLlDVg2qCmDbbFf4lDAPMD1d33e\nsNQ9E11VFWO5Ode2yNm70e6Mw7paOQ/WaPm/eiElFzKmZzm6mfWgz5yb+0NT\n0749CpkRgNf6Jl6Wx1B4fFBV1oxPEQ+khaVCp66Ph5xkq2GHWh0JzcIweoPG\nk/GG4SZGWWyGUefk9/RfcJlkVooiPjXnD1CZH+ZdERnqXwofzW84oOpSe+Yo\nNzpygp2JO7BrVSF3HLMu+Kscgo6FLAPP+uTtDVwOHfb225zDlF1OqTGZYAp0\nQBils8ekJ8ifZ3FPV7unZEevF6XrRx0BUre2NsLkCoqFQRhluV6JwKD+BrgH\nNFLBniHuBNqC4d8X+xtFjqvDhWB+VA5CZIt2OU6tpMwKE/6maFe5/WHPlPrs\nmUQyiTs9aW15pgESP8Cu5joyJWSgRDxs8tNtzj2f/4ySvsGiHgMuKnxyBooL\nWsdZ\r\n=i9fj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHRNTOWQrXrXjSFWSXtLI87bt3Qht8kwOJf/rGIp8mowIhAJkme/K295ltswvIvoKFxc6mZOZRzIp/ppKAB6h65a4Y"}]},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-safe_1.2.0_1618322638385_0.4494758006817332"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-04T18:03:46.413Z","1.0.0":"2020-10-04T18:03:46.582Z","modified":"2022-05-02T23:34:04.784Z","1.1.0":"2020-10-05T01:26:45.306Z","1.1.1":"2020-10-05T01:28:18.137Z","1.1.2":"2020-10-05T01:38:24.013Z","1.2.0":"2021-04-13T14:03:58.580Z"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"description":"A simple fs wrapper that doesn't throw","homepage":"https://connorwhite.org/github/fs-safe","keywords":["fs","safe","fs-safe","read","write","remove","watch","exists","dir","file","directory","directories","files","recursive","throw","without","try","catch","simple","make","executable","error","errors"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/fs-safe.git"},"author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"license":"MIT","readme":"<div align=\"center\">\n  <a href=\"https://github.com/bconnorwhite/fs-safe\">\n    <img alt=\"fs-safe\" src=\"assets/header.svg\" />\n  </a>\n  <a href=\"https://npmjs.com/package/fs-safe\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/fs-safe.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/fs-safe\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/fs-safe.svg\">\n  </a>\n  <a href=\"https://coveralls.io/github/bconnorwhite/fs-safe?branch=master\">\n    <img alt=\"Coverage Status\" src=\"https://coveralls.io/repos/github/bconnorwhite/fs-safe/badge.svg?branch=master\" />\n  </a>\n  <a href=\"https://github.com/bconnorwhite/fs-safe\">\n    <img alt=\"GitHub Stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/fs-safe?label=Stars%20Appreciated%21&style=social\">\n  </a>\n  <a href=\"https://twitter.com/bconnorwhite\">\n    <img alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/bconnorwhite.svg?label=%40bconnorwhite&style=social\">\n  </a>\n</div>\n\n<br />\n\n> A simple fs wrapper that doesn't throw.\n\n## Philosophy\n\nThrowing is bad. Instead, we should return a value correspondent to the success of an operation.\n- Read operations should return the expected value, or `undefined` if unable to read.\n- Write operations should return a boolean or `undefined` success value.\n  - `true`: Successful or unnecessary (ex: failing to create a directory that already exists)\n  - `false`: Unsuccessful\n  - `undefined`: Unsuccessful, but the desired state may already exist (ex: failing to create a directory but not knowing if that directory already exists)\n\n## Installation\n\n```sh\nyarn add fs-safe\n```\n\n```sh\nnpm install fs-safe\n```\n\n## API\n\n### Exists\n\n- [fileExists](#fileexists)\n- [dirExists](#direxists)\n\n### Directories\n\n- [readDir](#readdir)\n- [writeDir](#writedir)\n- [removeDir](#removedir)\n- [watchDir](#watchdir)\n\n### Files\n\n- [readFile](#readfile)\n- [writeFile](#writefile)\n- [removeFile](#removefile)\n- [watchFile](#watchfile)\n- [makeExecutable](#makeExecutable)\n\n### JSON\n- [readJSON](#readjson)\n- [writeJSON](#writejson)\n- [mergeJSON](#mergejson)\n\n### fileExists\n\n```ts\nimport { fileExists, fileExistsSync, FileExistsOptions } from \"fs-safe\";\n\nfunction fileExists(path: string, options?: FileExistsOptions): Promise<boolean | undefined>;\n\nfunction fileExistsSync(path: string, options?: FileExistsOptions): boolean | undefined;\n\ntype FileExistsOptions = {\n    /**\n     * Return true if path is directory. Default: `false`\n     */\n    includeDirectories?: boolean;\n};\n```\n\n### dirExists\n\n```ts\nimport { dirExists, dirExistsSync, DirExistsOptions } from \"fs-safe\";\n\nfunction dirExists(path: string, options?: DirExistsOptions): Promise<boolean | undefined>;\n\nfunction dirExistsSync(path: string, options?: DirExistsOptions): boolean | undefined;\n\ntype DirExistsOptions = {\n    /**\n     * Return true if path is file. Default: `false`\n     */\n    includeFiles?: boolean;\n};\n```\n\n### readDir\n\n```ts\nimport { readDir, readDirSync, ReadDirOptions } from \"fs-safe\";\n\nfunction readDir(path: string, options: ReadDirOptions): Promise<string[] | undefined>;\n\nfunction readDirSync(path: string, options: ReadDirOptions): string[] | undefined;\n\ntype ReadDirOptions = {\n  /**\n   * Recursively read child directories as well. Default: `true`\n   */\n  recursive?: boolean;\n    /**\n   * Whether to include directories in the results. Default: `false`\n   */\n  includeDirectories?: boolean;\n}\n```\n\n### writeDir\n\n```ts\nimport { writeDir, writeDirSync, WriteDirOptions } from \"fs-safe\";\n\nfunction writeDir(path: string, options: WriteDirOptions): Promise<boolean | undefined>;\n\nfunction writeDirSync(path: string, options: WriteDirOptions): boolean | undefined;\n\ntype WriteDirOptions = {\n  recursive?: boolean; // Default: true\n}\n```\n\n### removeDir\n\n```ts\nimport { removeDir, removeDirSync, RemoveDirOptions } from \"fs-safe\";\n\nfunction removeDir(path: string, options: RemoveDirOptions): Promise<boolean | undefined>;\n\nfunction removeDirSync(path: string, options: RemoveDirOptions): boolean | undefined;\n\ntype RemoveDirOptions = {\n  /**\n   * If true, perform a recursive directory removal. Default: `true`\n   */\n  recursive?: boolean;\n}\n```\n\n### watchDir\n\n#### Usage\n```ts\nimport { watchDir } from \"fs-safe\";\n\nconst watcher = watchDir(\"/path/to/dir\");\n\nwatcher.onReady(() => {\n  console.log(`Ready`);\n}).onAdd((path: string) => {\n  console.log(`Added ${path}`);\n}).onChange((path: string) => {\n  console.log(`Changed ${path}`);\n}).onRemove((path: string) => {\n  console.log(`Removed ${path}`);\n}).onAddDir((path: string) => {\n  console.log(`Added dir ${path}`);\n}).onRemoveDir((path: string) => {\n  console.log(`Added dir ${path}`);\n});\n\n// To stop watching:\nwatcher.stop();\n```\n\n#### Types\n```ts\nimport { watchDir, DirWatcher, EventCallback } from \"fs-safe\";\n\nfunction watchDir(path: string): DirWatcher;\n\ntype EventCallback = (path: string) => void;\n\ntype DirWatcher = {\n  onAdd: (cb: EventCallback) => DirWatcher;\n  onRemove: (cb: EventCallback) => DirWatcher;\n  onChange: (cb: EventCallback) => DirWatcher;\n  onAddDir: (cb: EventCallback) => DirWatcher;\n  onRemoveDir: (cb: EventCallback) => DirWatcher;\n  onReady: (cb: () => void) => DirWatcher;\n  stop: () => Promise<boolean>;\n}\n```\n\n### readFile\n\n```ts\nimport { readFile, readFileSync } from \"fs-safe\";\n\nreadFile(path: string) => Promise<string | undefined>;\n\nreadFileSync(path: string) => string | undefined;\n```\n\n### writeFile\n\n```ts\nimport { writeFile, writeFileSync, WriteFileOptions } from \"fs-safe\";\n\nfunction writeFile(path: string, content?: string | Buffer): Promise<boolean>;\n\nfunction writeFileSync(path: string, content?: string | Buffer): boolean;\n\ntype WriteFileOptions = {\n  /**\n   * Recursively create parent directories if needed. Default: `true`\n   */\n  recursive?: boolean;\n  /**\n   * Ensure file ends with a newline. Default: `true`\n   */\n  appendNewline?: boolean;\n  /**\n   * Write even if file already exists. Default: `true`\n   */\n  overwrite?: boolean;\n}\n```\n\n### removeFile\n\n```ts\nimport { removeFile, removeFileSync } from \"fs-safe\";\n\nfunction removeFile(path: string): Promise<boolean | undefined>;\n\nfunction removeFileSync(path: string): boolean | undefined;\n```\n\n### watchFile\n\n#### Usage\n```ts\nimport { watchFile } from \"fs-safe\";\n\nconst watcher = watchFile(\"/path/to/file.txt\");\n\nwatcher.onReady(() => {\n  console.log(`Ready`);\n}).onAdd((path: string) => {\n  console.log(`Added ${path}`);\n}).onChange((path: string) => {\n  console.log(`Changed ${path}`);\n}).onRemove((path: string) => {\n  console.log(`Removed ${path}`);\n});\n\n// To stop watching:\nwatcher.stop();\n```\n\n#### Types\n```ts\nimport { watchFile, FileWatcher, EventCallback } from \"fs-safe\";\n\nfunction watchFile(path: string): FileWatcher;\n\ntype EventCallback = (path: string) => void;\n\ntype FileWatcher = {\n  onAdd: (cb: EventCallback) => FileWatcher;\n  onRemove: (cb: EventCallback) => FileWatcher;\n  onChange: (cb: EventCallback) => FileWatcher;\n  onReady: (cb: () => void) => FileWatcher;\n  stop: () => Promise<boolean>;\n}\n```\n\n### makeExecutable\n\n```ts\nimport { makeExecutable, makeExecutableSync } from \"make-executable\";\n\nfunction makeExecutable(path: string): Promise<boolean | undefined>;\n\nfunction makeExecutableSync(path: string): boolean | undefined;\n```\n\n### readJSON\n\n#### Read a JSONValue:\n\n```ts\nimport { readJSON, readJSONSync, JSONValue } from \"read-json-safe\";\n\nfunction readJSON(path: string): Promise<JSONValue | undefined>;\n\nfunction readJSONSync(path: string): JSONValue | undefined;\n\ntype JSONValue = string | number | boolean | JSONObject | JSONArray | null;\n```\n\n#### Read a JSONObject:\n\n```ts\nimport { readJSONObject, readJSONObjectSync, JSONObject } from \"read-json-safe\";\n\nfunction readJSONObject(path: string): Promise<JSONObject| undefined>;\n\nfunction readJSONObjectSync(path: string): JSONObject| undefined;\n\ntype JSONObject = {\n    [key: string]: JSONValue;\n}\n```\n\n#### Read a JSONArray:\n\n```ts\nimport { readJSONArray, readJSONArraySync, JSONArray } from \"read-json-safe\";\n\nfunction readJSONArray(path: string): Promise<JSONArray | undefined>;\n\nfunction readJSONArraySync(path: string): JSONArray | undefined;\n\ntype JSONArray = Array<JSONValue>;\n```\n\n### writeJSON\n\n```ts\nimport { writeJSON, writeJSONSync, Options, JSONObject } from \"write-json-safe\";\n\nfunction writeJSON(path: string, content?: JSONObject, options?: Options): Promise<boolean>;\n\nfunction writeJSONSync(path: string, content?: JSONObject, options?: Options): boolean;\n\ntype Options = {\n  /**\n   * Output formatted JSON. Default: `true`\n   */\n  pretty?: boolean;\n  /**\n   * Recursively create parent directories if needed. Default: `true`\n   */\n  recursive?: boolean;\n  /**\n   * Ensure file ends with a newline. Default: `true`\n   */\n  appendNewline?: boolean;\n  /**\n   * Write even if file already exists. Default: `true`\n   */\n  overwrite?: boolean;\n}\n```\n\n### mergeJSON\n\n#### Usage\n\n##### For existing files:\n```ts\nimport { mergeJSON } from \"fs-safe\";\n\n// old-file.json (before):\n// {\n//  \"ok\": true\n// }\n//\nmergeJSON(\"old-file.json\", { test: 1 });\n\n// old-file.json (after):\n// {\n//   \"ok\": true,\n//   \"test\": 1\n// }\n//\n```\n\n##### For new files:\n```ts\nimport { mergeJSON } from \"fs-safe\";\n\nmergeJSON(\"new-file.json\", { test: 1 });\n\n// new-file.json:\n// {\n//   \"test\": 1\n// }\n//\n\n```\n\n#### Types\n```ts\nimport { mergeJSON, mergeJSONSync, JSONObject } from \"fs-safe\";\n\nfunction mergeJSON(path: string, object: JSONObject, options?: Options): Promise<boolean>;\n\nfunction mergeJSONSync(path: string, object: JSONObject, options?: Options): boolean;\n\ntype Options = {\n  /**\n   * Output formatted JSON. Default: `true`\n   */\n  pretty?: boolean;\n  /**\n   * Recursively create parent directories if needed. Default: `true`\n   */\n  recursive?: boolean;\n  /**\n   * Ensure file ends with a newline. Default: `true`\n   */\n  appendNewline?: boolean;\n}\n```\n\n<br />\n\n<h2>Dependencies<img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/david/bconnorwhite/fs-safe.svg\"></h2>\n\n- [dir-exists-safe](https://www.npmjs.com/package/dir-exists-safe): Check if a directory exists without try catch\n- [file-exists-safe](https://www.npmjs.com/package/file-exists-safe): Check if a file exists without try catch\n- [make-executable](https://www.npmjs.com/package/make-executable): Set the executable bits on a file\n- [merge-json-file](https://www.npmjs.com/package/merge-json-file): Merge a JSON file with a JSON object\n- [read-dir-safe](https://www.npmjs.com/package/read-dir-safe): Read directories recursively or non-recursively\n- [read-file-safe](https://www.npmjs.com/package/read-file-safe): Read files without try catch\n- [read-json-safe](https://www.npmjs.com/package/read-json-safe): Read JSON files without try catch\n- [remove-dir-safe](https://www.npmjs.com/package/remove-dir-safe): Remove directories recursively or non-recursively without try catch\n- [remove-file-safe](https://www.npmjs.com/package/remove-file-safe): Remove files without try catch\n- [watch-dir-safe](https://www.npmjs.com/package/watch-dir-safe): Watch a directory for changes\n- [watch-file-safe](https://www.npmjs.com/package/watch-file-safe): Watch a file for changes\n- [write-dir-safe](https://www.npmjs.com/package/write-dir-safe): Create directories and their parents recursively without try catch\n- [write-file-safe](https://www.npmjs.com/package/write-file-safe): Write files and create parent directories if necessary\n- [write-json-safe](https://www.npmjs.com/package/write-json-safe): Write formatted JSON to a file\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/fs-safe.svg\"></h2>\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): Bob is a toolkit for TypeScript projects\n\n<br />\n\n<h2>License <img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/fs-safe.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n","readmeFilename":"README.md"}