{"_id":"scope-lock","_rev":"7-a549708f538f2ed278dd38b63b9b61f4","name":"scope-lock","dist-tags":{"latest":"1.2.4"},"versions":{"0.0.0":{"name":"scope-lock","version":"0.0.0","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@0.0.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"32e7f76b8359ecba2ee722ee68bf95294bb0c9f3","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-0.0.0.tgz","fileCount":4,"integrity":"sha512-X+PMR52R0YQoIXGR8/Vj1di7IKtjB4Lc0a72SGgLOaPLHEROaSa51jYtMRwGeYSnsTqBtDYmQZzohxk2HeaOAg==","signatures":[{"sig":"MEQCIG2ijlZV5yVUWRPt94oJfFfKQz6l0rA9/7/ysHAMhlsvAiA6nzj2UjHXnmJS8iiNuIeIsDKBNOLCJIDuo34B6JRw7A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13603},"main":"index.js","gitHead":"3e1a9e3faf47ec56498af35a7cacc38e179ea39b","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_0.0.0_1732306653858_0.16447217319078922","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"scope-lock","version":"1.0.0","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@1.0.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"0b0ac13ce173508caaf6d122a926b095c39e3502","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.0.0.tgz","fileCount":4,"integrity":"sha512-fQs4mqeO06l9eQMoImJ4fQuY68dcDVrL5l1fAV406gW3bHzNTglA52PsQR7QHRUO1gfqupLH2wFJDOfsEI+KtA==","signatures":[{"sig":"MEQCIH5ripVXVNlzPgMB6YpYqPUZKkTsv14AdCarrzBmI0x9AiBalzMnYh6stv9ezkXi+3VoJEuTB24emzEpEm6N3EwVtw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13603},"main":"index.js","gitHead":"dde57dc23ccdf24b8d190616b21515d76141e852","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_1.0.0_1732306690549_0.8232157984360411","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"scope-lock","version":"1.1.0","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@1.1.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"09d449f1ef88d689bb64310a791ed04f21343d57","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.1.0.tgz","fileCount":4,"integrity":"sha512-oKCWVrXuppkk412W8B4qTmLfYfUu5yG8dUH7z87cVrOS+IkJQb8jcfkToeeSZIVRwkuS8mGeF6gZuf1MEOAu8g==","signatures":[{"sig":"MEQCIGCAsigaCpgysRdMg+cYYKoLxc1hrXIsGEGWWMiviIVVAiBLmsswYFgGVk32ji5oIGaZnadv4aXmIEHyzgRb51B4CQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13889},"main":"index.js","gitHead":"9a186df1f344ab6dd96578ee921e8d26e72ce1a3","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_1.1.0_1732307712903_0.4732646836609864","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"scope-lock","version":"1.2.0","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@1.2.0","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"9af466acc4516092c7130dd3236c8972db63075b","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.2.0.tgz","fileCount":4,"integrity":"sha512-uE6mUvO7k6gJlMDFiTqGP3WQhRDOvHK4rWn58TV5AMDLpmnn+ucPb9MuK3SZC80b+17Q9z3M+0JFBiEHPzUpUA==","signatures":[{"sig":"MEYCIQCXdXsf+JArrQgeMIkbHvp4Jlw/uVbcthzxasZZmkPR1QIhANcfAoPhHR+uOfNeWepgsgBYL4APbKJLjcKa+KxfEmrX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14035},"main":"index.js","gitHead":"65713275861bea3974221783d92a19a202bb1828","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_1.2.0_1732307883783_0.7252698995056861","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"scope-lock","version":"1.2.1","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@1.2.1","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"e4e37f24a9009119d7cd61a62c5f510cf5a1c74a","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.2.1.tgz","fileCount":4,"integrity":"sha512-rLqbl2ulV26YtBSV0zrS6jWNPcwA0a4EbRa+z2gHHXDHoqyZTce2CYQZ4HLaly30fhEqEYFyj2hito8nNqHtvg==","signatures":[{"sig":"MEUCIQCln8jkQwXwJbwAJ8zcJW7TjpiWRa1x0Gm8tCQdopvFkQIgVCt2lGasYI+t4aeBy0wMW3FWV7q0JZ59m2Rx2ENFdN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14089},"main":"index.js","gitHead":"ecc1ae3d9a382323a6a111cccde6130513271c19","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_1.2.1_1732528733622_0.8428351784588604","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"scope-lock","version":"1.2.2","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@1.2.2","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"5f8c46d3079aef4b03611837ce10eddda2608bfb","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.2.2.tgz","fileCount":4,"integrity":"sha512-LQa5Kn0LRgOjSNHFZmISVTnt8cy1MpD41WcMaFYf8/jPrFzswNvm/uxAsQz0TrgrP8gPeCrEWx2U1v0kxjOJZQ==","signatures":[{"sig":"MEYCIQCI9N4cBnjth8gtdWOEkRP4iaEdbXuXzciHCIbseGNj/gIhAPPylheh7i6ZgKvwSkWt6gvLWh4QQM8oO8yZlB07yVh8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14325},"main":"index.js","gitHead":"9f2c9e4ae851942da39e95cd066248c9ef6c023f","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_1.2.2_1732612493234_0.8592974617675138","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"scope-lock","version":"1.2.3","author":{"name":"Holepunch Inc."},"license":"Apache-2.0","_id":"scope-lock@1.2.3","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/holepunchto/scope-lock","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"dist":{"shasum":"226906eac572376948bbbbed982b4b0441bdfe00","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.2.3.tgz","fileCount":4,"integrity":"sha512-Q+PqcbJCq6ew9xb0PoYoE6hHUwTPQOVt2LOFjVcDJ81uvyMWlZ6l0/h6NVGnx4ZCxuWI2MeXJYBhNwPVYmJMWA==","signatures":[{"sig":"MEYCIQDlo8D1Beue6Q6soT6lQMJZP1dy2l6ACg1vaurOBSLw9AIhAPO/D9P4EfLLu3WGL05QGXp2ZcGnTo4Bb3Y+9PUxUVYi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14312},"main":"index.js","gitHead":"61cc5b9b54fb6ef18620329aecefc521091393bf","scripts":{"test":"standard && brittle test.js"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"repository":{"url":"git+https://github.com/holepunchto/scope-lock.git","type":"git"},"_npmVersion":"10.7.0","description":"Some concurrency semantics around entering scopes","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/scope-lock_1.2.3_1732613075495_0.06915821669514322","host":"s3://npm-registry-packages"}},"1.2.4":{"name":"scope-lock","version":"1.2.4","description":"Some concurrency semantics around entering scopes","main":"index.js","devDependencies":{"brittle":"^3.7.0","standard":"^17.1.2"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/scope-lock.git"},"author":{"name":"Holepunch Inc."},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"homepage":"https://github.com/holepunchto/scope-lock","_id":"scope-lock@1.2.4","gitHead":"4864a69efdc4443eed19680b19b5c7d6441bf442","_nodeVersion":"20.11.1","_npmVersion":"10.7.0","dist":{"integrity":"sha512-BpSd8VCuCxW9ZitcdIC/vjs3gMaP9bRBL5nkHcyfX2VrS52n13/rHuBA2xJ/S/4DPuRdAO/Bk8pWd8eD/gHCIA==","shasum":"eac350c3dd8b6465d24a022697188fc13a2ad0bc","tarball":"https://registry.npmjs.org/scope-lock/-/scope-lock-1.2.4.tgz","fileCount":4,"unpackedSize":14332,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwJLk/zU6+NMryqaMeN1VDCIHuyP62w0OkDLpyeAipawIgNuXVtdTh93ch8QEem+Hz8maEtE02C+hoY8/TBSAMRZk="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scope-lock_1.2.4_1732613717337_0.09719978554585151"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-22T20:17:33.857Z","modified":"2024-11-26T09:35:17.649Z","0.0.0":"2024-11-22T20:17:34.022Z","1.0.0":"2024-11-22T20:18:10.721Z","1.1.0":"2024-11-22T20:35:13.065Z","1.2.0":"2024-11-22T20:38:04.015Z","1.2.1":"2024-11-25T09:58:53.757Z","1.2.2":"2024-11-26T09:14:53.385Z","1.2.3":"2024-11-26T09:24:35.690Z","1.2.4":"2024-11-26T09:35:17.512Z"},"bugs":{"url":"https://github.com/holepunchto/scope-lock/issues"},"author":{"name":"Holepunch Inc."},"license":"Apache-2.0","homepage":"https://github.com/holepunchto/scope-lock","repository":{"type":"git","url":"git+https://github.com/holepunchto/scope-lock.git"},"description":"Some concurrency semantics around entering scopes","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"readme":"# scope-lock\n\nSome concurrency semantics around entering scopes\n\n```\nnpm install scope-lock\n```\n\n## Usage\n\n``` js\nconst ScopeLock = require('scope-lock')\n\n// normal lock runs all entries in the lock list\nconst l = new ScopeLock()\n\nawait l.lock()\n// ... do your thing\nl.unlock()\n\n// debounced lock runs first and last entry in the lock list\nconst d = new ScopeLock({ debounce: true }) // debounced lock\n\nif (await d.lock()) {\n  // if we get lock do our thing\n}\n\n// wait for all current work to drain\nawait d.flush()\n```\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}