{"_id":"read-write-mutexify","_rev":"2-6bfbf0cefaa112d4937982c66acd4c3f","name":"read-write-mutexify","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"read-write-mutexify","version":"1.0.0","description":"Like mutexify but with read/write locks","main":"index.js","scripts":{"test":"standard && brittle test.js"},"devDependencies":{"brittle":"^3.3.0","standard":"^17.1.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/read-write-mutexify.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/read-write-mutexify/issues"},"homepage":"https://github.com/mafintosh/read-write-mutexify","gitHead":"9193e580852004ce5433d98fb2d330d799893baf","_id":"read-write-mutexify@1.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-sZHBluMbuJtcxYj1B/sYGr4JCJLYwF2GECeRQb6MwLcjO+BrUG3lzKcwQU5aI0EuDcnVGAuG8uyZBTYbJpct0w==","shasum":"7aca6ce3f860f9136596a359f945bec0945da2a6","tarball":"https://registry.npmjs.org/read-write-mutexify/-/read-write-mutexify-1.0.0.tgz","fileCount":6,"unpackedSize":5745,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3Qp/xOuH0PBQrupWNyCJt+8bwYpEyzD/RuBP98k084wIhAOiztAEad4HOpIvDa02beKdaNqPcsv8Vu6hs8be7rEja"}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-write-mutexify_1.0.0_1685708411635_0.8907651284233784"},"_hasShrinkwrap":false},"2.0.0":{"name":"read-write-mutexify","version":"2.0.0","description":"Like mutexify but with read/write locks","main":"index.js","scripts":{"test":"standard && brittle test.js"},"devDependencies":{"brittle":"^3.3.0","standard":"^17.1.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/read-write-mutexify.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/read-write-mutexify/issues"},"homepage":"https://github.com/mafintosh/read-write-mutexify","gitHead":"8680ca5f7880d73010e34628129209186ff446fe","_id":"read-write-mutexify@2.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-liO4OvGsKqgHDWI1XHeTd2axGlzxPlqene9L51KSNqZm8PNFrMlwkFEafJYHOxdZ2RjsWi0owHhA6lDjmcKVtw==","shasum":"8c6c1993cf7c40f323cc73bb59ae90320bf3ab60","tarball":"https://registry.npmjs.org/read-write-mutexify/-/read-write-mutexify-2.0.0.tgz","fileCount":6,"unpackedSize":6603,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHLkBOcvrsIP1pWLpyBwRAumCbLdRoj4Jvu2DgHoAewaAiBrBYfeL3TTLUCKHiEZp4MlvmgGFXxSxNC8PPHcVr/0KQ=="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-write-mutexify_2.0.0_1685741564052_0.6131300553605348"},"_hasShrinkwrap":false},"2.1.0":{"name":"read-write-mutexify","version":"2.1.0","description":"Like mutexify but with read/write locks","main":"index.js","scripts":{"test":"standard && brittle test.js"},"devDependencies":{"brittle":"^3.3.0","standard":"^17.1.0"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/read-write-mutexify.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/read-write-mutexify/issues"},"homepage":"https://github.com/mafintosh/read-write-mutexify","gitHead":"b70b0217c362c41a1e86a1fc6f7e7459f17969d1","_id":"read-write-mutexify@2.1.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-fDw/p5/acI1ytVY1UbxEDma/ej1yJH/n9NcjS9YNzcE6sPBPWdlru3ydRa/UBowUg4zqOvNMD5SOGYJrlQ6MzQ==","shasum":"d8915be88863070d44a069163ef69007acd7c622","tarball":"https://registry.npmjs.org/read-write-mutexify/-/read-write-mutexify-2.1.0.tgz","fileCount":6,"unpackedSize":6715,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwlkuMelfrn8drSOxJGATnYwWtAVJLk/iukAVuKaJ6PwIgFvCdEW0m/R0LKBmMXuLEpXMZh2BIZ7+ZRGgqBlsPRWw="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-write-mutexify_2.1.0_1685872629612_0.628150002340802"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-02T12:20:11.634Z","1.0.0":"2023-06-02T12:20:11.819Z","modified":"2023-06-04T09:57:09.871Z","2.0.0":"2023-06-02T21:32:44.270Z","2.1.0":"2023-06-04T09:57:09.756Z"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"description":"Like mutexify but with read/write locks","homepage":"https://github.com/mafintosh/read-write-mutexify","repository":{"type":"git","url":"git+https://github.com/mafintosh/read-write-mutexify.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/read-write-mutexify/issues"},"license":"MIT","readme":"# read-write-mutexify\n\nLike [mutexify](https://github.com/mafintosh/mutexify) but with read/write locks\n\n```\nnpm install read-write-mutexify\n```\n\n## Usage\n\n``` js\nconst RW = require('read-write-mutexify')\n\nconst rw = new RW()\n\n// read locks waits for writer locks to be released\nawait rw.read.lock()\nawait rw.read.lock() // make as many as you want\n\n// unlock with unlock\nrw.read.unlock()\nrw.read.unlock()\n\n// only one writer can have the write lock and it waits\n// for any read lock to be released\n\nawait rw.write.lock()\n\n// unlock with unlock\nrw.write.unlock()\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}