{"_id":"semaphore-async-await","_rev":"4579942","name":"semaphore-async-await","description":"A promise-based semaphore implementation suitable to be used with async/await.","dist-tags":{"latest":"1.5.1"},"maintainers":[{"name":"jsoendermann","email":""}],"time":{"modified":"2026-04-10T15:56:34.000Z","created":"2016-11-04T09:42:36.476Z","1.5.1":"2017-03-20T12:21:52.537Z","1.5.0":"2017-03-17T12:42:14.049Z","1.4.1":"2017-02-21T11:21:17.089Z","1.4.0":"2017-02-21T11:05:28.681Z","1.3.2":"2017-02-21T07:28:44.971Z","1.3.1":"2016-12-16T15:12:05.177Z","1.3.0":"2016-12-16T15:01:08.415Z","1.2.2":"2016-12-16T11:46:54.051Z","1.2.1":"2016-12-11T13:30:28.655Z","1.2.0":"2016-12-07T17:11:02.140Z","1.1.2":"2016-11-27T20:50:12.964Z","1.1.1":"2016-11-27T11:11:14.077Z","1.1.0":"2016-11-27T02:46:09.571Z","1.0.4":"2016-11-27T01:59:34.349Z","1.0.3":"2016-11-27T01:48:46.844Z","1.0.2":"2016-11-04T11:49:48.124Z","1.0.1":"2016-11-04T11:48:00.653Z","1.0.0":"2016-11-04T10:49:31.165Z","0.1.0":"2016-11-04T09:42:36.476Z"},"users":{},"author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"versions":{"1.5.1":{"name":"semaphore-async-await","version":"1.5.1","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"jest","lint":"tslint 'src/**/*.ts'","prepush":"npm run lint"},"engines":{"node":">=4.1"},"main":"./dist/index.js","typings":"./dist/index.d.ts","devDependencies":{"@types/jest":"^19.2.2","husky":"^0.13.2","jest":"^19.0.2","ts-jest":"^19.0.2","tslint":"^4.5.1","typedoc":"^0.5.7","typescript":"^2.2.1"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js"]},"gitHead":"0f3d8d32be6827f529a6441977bb20c9dae6f392","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.5.1","_shasum":"857bef5e3644601ca4b9570b87e9df5ca12974fa","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"857bef5e3644601ca4b9570b87e9df5ca12974fa","size":6241,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.5.1.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.5.1.tgz_1490012510657_0.437393244355917"},"directories":{},"publish_time":1490012512537,"_hasShrinkwrap":false,"_cnpm_publish_time":1490012512537,"_cnpmcore_publish_time":"2021-12-16T19:18:33.197Z"},"1.5.0":{"name":"semaphore-async-await","version":"1.5.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/index.js","typings":"./dist/index.d.ts","devDependencies":{"jasmine-es6":"^0.4.0","tslint":"^4.1.0","typedoc":"^0.5.1","typescript":"^2.1.4"},"gitHead":"6664e7a7b0f0d550d8989853725967b574b5ef2b","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.5.0","_shasum":"6f134330cd100dcd14f0081c9a332307a612dd01","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"6f134330cd100dcd14f0081c9a332307a612dd01","size":5997,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.5.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.5.0.tgz_1489754533712_0.6735423088539392"},"directories":{},"publish_time":1489754534049,"_hasShrinkwrap":false,"_cnpm_publish_time":1489754534049,"_cnpmcore_publish_time":"2021-12-16T19:18:33.390Z"},"1.4.1":{"name":"semaphore-async-await","version":"1.4.1","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/Semaphore.js","typings":"./dist/Semaphore.d.ts","devDependencies":{"jasmine-es6":"^0.4.0","tslint":"^4.1.0","typedoc":"^0.5.1","typescript":"^2.1.4"},"gitHead":"5f0fbb308d8093db92ea0545087898f0fb2b55ce","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.4.1","_shasum":"991b64c62ad31d196626aac08e5f253f91b2313b","_from":".","_npmVersion":"3.8.0","_nodeVersion":"7.4.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"991b64c62ad31d196626aac08e5f253f91b2313b","size":5345,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.4.1.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.4.1.tgz_1487676075367_0.68544971360825"},"directories":{},"publish_time":1487676077089,"_hasShrinkwrap":false,"_cnpm_publish_time":1487676077089,"_cnpmcore_publish_time":"2021-12-16T19:18:33.607Z"},"1.4.0":{"name":"semaphore-async-await","version":"1.4.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/Semaphore.js","typings":"./dist/Semaphore.d.ts","devDependencies":{"jasmine-es6":"^0.4.0","tslint":"^4.1.0","typedoc":"^0.5.1","typescript":"^2.1.4"},"dependencies":{"@types/core-js":"^0.9.35"},"gitHead":"836cd3ab6f678c6f4505cea045c0b6225214906d","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.4.0","_shasum":"ae8448f00cf30866a93dbf21c1a4b58185f5c010","_from":".","_npmVersion":"3.8.0","_nodeVersion":"7.4.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"ae8448f00cf30866a93dbf21c1a4b58185f5c010","size":5381,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.4.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.4.0.tgz_1487675126833_0.15907359588891268"},"directories":{},"publish_time":1487675128681,"_hasShrinkwrap":false,"_cnpm_publish_time":1487675128681,"_cnpmcore_publish_time":"2021-12-16T19:18:33.778Z"},"1.3.2":{"name":"semaphore-async-await","version":"1.3.2","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/Semaphore.js","typings":"./dist/Semaphore.d.ts","devDependencies":{"jasmine-es6":"^0.4.0","tslint":"^4.1.0","typedoc":"^0.5.1","typescript":"^2.1.4"},"dependencies":{"@types/core-js":"^0.9.35"},"gitHead":"a42eff25b953d3757c3236aea037c507302d1099","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.3.2","_shasum":"6477efc65690273438184b5a0df412785b33b3a8","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"6477efc65690273438184b5a0df412785b33b3a8","size":5336,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.3.2.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.3.2.tgz_1487662124744_0.9275936079211533"},"directories":{},"publish_time":1487662124971,"_hasShrinkwrap":false,"_cnpm_publish_time":1487662124971,"_cnpmcore_publish_time":"2021-12-16T19:18:33.980Z"},"1.3.1":{"name":"semaphore-async-await","version":"1.3.1","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/Semaphore.js","typings":"./dist/Semaphore.d.ts","devDependencies":{"@types/core-js":"^0.9.35","jasmine-es6":"^0.4.0","tslint":"^4.1.0","typedoc":"^0.5.1","typescript":"^2.1.4"},"gitHead":"a065629927718fadeba74acd758f266d4da55d87","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.3.1","_shasum":"f3b7a0164b0871f5f91cd6d65bd82dfa881422f0","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"f3b7a0164b0871f5f91cd6d65bd82dfa881422f0","size":5321,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.3.1.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.3.1.tgz_1481901124566_0.8006311217322946"},"directories":{},"publish_time":1481901125177,"_hasShrinkwrap":false,"_cnpm_publish_time":1481901125177,"_cnpmcore_publish_time":"2021-12-16T19:18:34.360Z"},"1.3.0":{"name":"semaphore-async-await","version":"1.3.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","generate-docs":"typedoc --tsconfig ./tsconfig-typedoc.json --theme minimal --mode file --module system --out docs ./Semaphore.ts","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/Semaphore.js","typings":"./dist/Semaphore.d.ts","devDependencies":{"@types/core-js":"^0.9.35","jasmine-es6":"^0.4.0","tslint":"^4.1.0","typedoc":"^0.5.1","typescript":"^2.1.4"},"gitHead":"e64f575e257802a30371e842b2025d469504b82f","description":"A promise-based semaphore implementation suitable to be used with async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.3.0","_shasum":"6d090c096f67c7e3d26f3494e746f644c09887ed","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"6d090c096f67c7e3d26f3494e746f644c09887ed","size":5323,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.3.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.3.0.tgz_1481900466499_0.8783696682658046"},"directories":{},"publish_time":1481900468415,"_hasShrinkwrap":false,"_cnpm_publish_time":1481900468415,"_cnpmcore_publish_time":"2021-12-16T19:18:34.563Z"},"1.2.2":{"name":"semaphore-async-await","version":"1.2.2","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","scripts":{"build":"tsc","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./dist/Semaphore.js","typings":"./dist/Semaphore.d.ts","devDependencies":{"@types/core-js":"^0.9.35","jasmine-es6":"^0.4.0","tslint":"^4.1.0","typescript":"^2.1.4"},"gitHead":"7d4e61575086d15ee3cb98bec6363ea8212db8ff","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.2.2","_shasum":"f11d99c6683b346c17a7fa92e7a3247d38a94389","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"f11d99c6683b346c17a7fa92e7a3247d38a94389","size":5129,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.2.2.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.2.2.tgz_1481888813451_0.8573346917983145"},"directories":{},"publish_time":1481888814051,"_hasShrinkwrap":false,"_cnpm_publish_time":1481888814051,"_cnpmcore_publish_time":"2021-12-16T19:18:34.770Z"},"1.2.1":{"name":"semaphore-async-await","version":"1.2.1","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"gulp","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./lib/Semaphore.js","typings":"./lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-plugin-transform-runtime":"^6.15.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"077c8819a7befaa268eafe25bdc8f20ce339e4ca","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.2.1","_shasum":"310e141e0f15d568ec0c29a9baf93828f7b71e83","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"310e141e0f15d568ec0c29a9baf93828f7b71e83","size":5397,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.2.1.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.2.1.tgz_1481463026465_0.354808796197176"},"directories":{},"publish_time":1481463028655,"_hasShrinkwrap":false,"_cnpm_publish_time":1481463028655,"_cnpmcore_publish_time":"2021-12-16T19:18:34.996Z"},"1.2.0":{"name":"semaphore-async-await","version":"1.2.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"gulp","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./lib/Semaphore.js","typings":"./lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-plugin-transform-runtime":"^6.15.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"0aaa9500d11bc20a0830e185a84dda822a3e37b0","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.2.0","_shasum":"0d0c0a7891c66873b3994abc1d29a4ab39baf0d4","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"0d0c0a7891c66873b3994abc1d29a4ab39baf0d4","size":5397,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.2.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.2.0.tgz_1481130660329_0.5865129269659519"},"directories":{},"publish_time":1481130662140,"_hasShrinkwrap":false,"_cnpm_publish_time":1481130662140,"_cnpmcore_publish_time":"2021-12-16T19:18:35.233Z"},"1.1.2":{"name":"semaphore-async-await","version":"1.1.2","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"gulp","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./lib/Semaphore.js","typings":"./lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-plugin-transform-runtime":"^6.15.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"1e50547e88360d52301a6c0ea47a17f85b45075a","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.1.2","_shasum":"b536f69fef6c7f6f5c600ae5e3a5c93c9a8aa501","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"b536f69fef6c7f6f5c600ae5e3a5c93c9a8aa501","size":5509,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.1.2.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.1.2.tgz_1480279812375_0.1463684958871454"},"directories":{},"publish_time":1480279812964,"_hasShrinkwrap":false,"_cnpm_publish_time":1480279812964,"_cnpmcore_publish_time":"2021-12-16T19:18:35.541Z"},"1.1.1":{"name":"semaphore-async-await","version":"1.1.1","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"gulp","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./lib/Semaphore.js","typings":"./lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"b066e6a57cd0716f4b7f7ecacce716714ea286e3","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.1.1","_shasum":"efcdd063f76f21e99aa12512d387200bb4770d5c","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"efcdd063f76f21e99aa12512d387200bb4770d5c","size":5577,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.1.1.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.1.1.tgz_1480245073474_0.8227747802156955"},"directories":{},"publish_time":1480245074077,"_hasShrinkwrap":false,"_cnpm_publish_time":1480245074077,"_cnpmcore_publish_time":"2021-12-16T19:18:35.740Z"},"1.1.0":{"name":"semaphore-async-await","version":"1.1.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./lib/Semaphore.js","typings":"./lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"c24b485ddb3bca69ac2eb4a40d7dc3c5b2bc0957","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.1.0","_shasum":"3206c91bff7dcf709cc512b055c367a32d089271","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"3206c91bff7dcf709cc512b055c367a32d089271","size":5575,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.1.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.1.0.tgz_1480214769041_0.09844695054925978"},"directories":{},"publish_time":1480214769571,"_hasShrinkwrap":false,"_cnpm_publish_time":1480214769571,"_cnpmcore_publish_time":"2021-12-16T19:18:36.112Z"},"1.0.4":{"name":"semaphore-async-await","version":"1.0.4","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"./lib/Semaphore.js","typings":"./lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"e32c3f59d280c2ba093d9462af725c002ca7865d","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.0.4","_shasum":"ad06551f750ca3b3546667d97c0917a681fd9db6","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"ad06551f750ca3b3546667d97c0917a681fd9db6","size":4858,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.0.4.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.0.4.tgz_1480211972385_0.8167314999736845"},"directories":{},"publish_time":1480211974349,"_hasShrinkwrap":false,"_cnpm_publish_time":1480211974349,"_cnpmcore_publish_time":"2021-12-16T19:18:36.319Z"},"1.0.3":{"name":"semaphore-async-await","version":"1.0.3","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"lib/Semaphore.js","types":"lib/Semaphore.d.ts","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015":"^6.18.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-typescript":"^3.1.3","jasmine-es6":"^0.4.0","merge2":"^1.0.2","typescript":"^2.0.10"},"gitHead":"cc19682450b49f27790a284b58b8c4f00d8547f0","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.0.3","_shasum":"4ad4ba875d954e87771cb25864594bfb46f8ba6b","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"4ad4ba875d954e87771cb25864594bfb46f8ba6b","size":4854,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.0.3.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.0.3.tgz_1480211326302_0.05024022120051086"},"directories":{},"publish_time":1480211326844,"_hasShrinkwrap":false,"_cnpm_publish_time":1480211326844,"_cnpmcore_publish_time":"2021-12-16T19:18:36.518Z"},"1.0.2":{"name":"semaphore-async-await","version":"1.0.2","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","repository":{"type":"git","url":"git+ssh://git@github.com/jsoendermann/semaphore-async-await.git"},"license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"lib/Semaphore.js","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","jasmine-es6":"^0.4.0"},"gitHead":"5956c32ca448978d684221bff9f3af800f966b4c","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"_id":"semaphore-async-await@1.0.2","_shasum":"660c2ff57b0ce346d2329d4cf8dca18a140ab094","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"660c2ff57b0ce346d2329d4cf8dca18a140ab094","size":3526,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.0.2.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.0.2.tgz_1478260186433_0.8046593009494245"},"directories":{},"publish_time":1478260188124,"_hasShrinkwrap":false,"_cnpm_publish_time":1478260188124,"_cnpmcore_publish_time":"2021-12-16T19:18:36.732Z"},"1.0.1":{"name":"semaphore-async-await","version":"1.0.1","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"homepage":"https://github.com/jsoendermann/semaphore-async-await","license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"lib/Semaphore.js","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","jasmine-es6":"^0.4.0"},"gitHead":"00a013ef2a035ea836dac3c1880bd91cc41b9878","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","_id":"semaphore-async-await@1.0.1","_shasum":"fccf9fc34581ba90083342fb733c8461e60daecb","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"fccf9fc34581ba90083342fb733c8461e60daecb","size":3489,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.0.1.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.0.1.tgz_1478260080122_0.02980431285686791"},"directories":{},"publish_time":1478260080653,"_hasShrinkwrap":false,"_cnpm_publish_time":1478260080653,"_cnpmcore_publish_time":"2021-12-16T19:18:36.943Z"},"1.0.0":{"name":"semaphore-async-await","version":"1.0.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"lib/Semaphore.js","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","jasmine-es6":"^0.4.0"},"gitHead":"96a0dc2d94990b71d21f30dc9df6faa7eeadfc49","description":"A promise-based semaphore implementation suitable to be used with ES7 async/await.","_id":"semaphore-async-await@1.0.0","_shasum":"5642bc7d00edf5f8c1313b4b3830b1cb39607825","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"5642bc7d00edf5f8c1313b4b3830b1cb39607825","size":3463,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-1.0.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/semaphore-async-await-1.0.0.tgz_1478256570635_0.500229828292504"},"directories":{},"publish_time":1478256571165,"_hasShrinkwrap":false,"_cnpm_publish_time":1478256571165,"_cnpmcore_publish_time":"2021-12-16T19:18:37.156Z"},"0.1.0":{"name":"semaphore-async-await","version":"0.1.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"license":"MIT","dependencies":{},"scripts":{"build":"babel src -d lib","prepublish":"npm run build","test":"node_modules/jasmine-es6/bin/jasmine.js"},"engines":{"node":">=4.1"},"main":"lib/Semaphore.js","devDependencies":{"babel-cli":"^6.16.0","babel-eslint":"^7.0.0","babel-plugin-transform-async-to-generator":"^6.16.0","babel-plugin-transform-builtin-extend":"^1.1.0","babel-preset-es2015-node":"^6.1.1","eslint":"^3.8.0","eslint-config-airbnb":"^12.0.0","eslint-plugin-import":"^1.16.0","eslint-plugin-jsx-a11y":"^2.2.3","eslint-plugin-react":"^6.4.1","jasmine-es6":"^0.4.0"},"gitHead":"627b90b6ada3b41ae221b6c65da6bd3373c50e9a","description":"JavaScript Semaphore ====================","_id":"semaphore-async-await@0.1.0","_shasum":"c02d19244afe07aedd7b092ae0c75c53fdeffe4f","_from":".","_npmVersion":"3.8.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jsoendermann","email":"jan.soendermann+npm@gmail.com"},"dist":{"shasum":"c02d19244afe07aedd7b092ae0c75c53fdeffe4f","size":2655,"noattachment":false,"key":"/semaphore-async-await/-/semaphore-async-await-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/semaphore-async-await/download/semaphore-async-await-0.1.0.tgz"},"maintainers":[{"name":"jsoendermann","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/semaphore-async-await-0.1.0.tgz_1478252554863_0.09889911254867911"},"directories":{},"publish_time":1478252556476,"_hasShrinkwrap":false,"_cnpm_publish_time":1478252556476,"_cnpmcore_publish_time":"2021-12-16T19:18:37.372Z"}},"readme":"# JavaScript Semaphore\n\nA promise-based semaphore implementation suitable to be used with async/await.\n\n## Spare me the details, all I need is a lock.\nJust ```import { Lock } from 'semaphore-async-await'```, acquire the lock by calling ```await lock.acquire()``` and release it when you're done by calling ```lock.release()```.\n\n## But JavaScript is single-threaded and doesn't need semaphores!\nThis package can be used to synchronize functions that span multiple iterations of the event loop and prevent other code from being executed while your function is waiting.\n\nSuppose you have a function\n\n```javascript\nasync function criticalFunction() {\n  const data = await getDataFromDb();\n  const modifiedData = await asynchronouslyDoStuffWithData(data);\n  return writeDataBackToDb(modifiedData);\n}\n```\n\nCalling this function repeatedly could lead to overlapping read/writes. To avoid this problem, a lock can be added like so:\n\n```javascript\nconst lock = new Semaphore(1);\n\nasync function criticalFunctionSynchronous() {\n  await lock.acquire();\n\n  await criticalFunction();\n\n  lock.release();\n}\n```\n\nAsynchronous functions like ```criticalFunction``` are executed in multiple chunks of code on the event loop, this package makes it possible to enforce an ordering in these chunks.\n\n## Install\n```yarn add semaphore-async-await```\n\n[<h2>API</h2>](http://jsoendermann.github.io/semaphore-async-await/classes/semaphore.html)\n\n## Usage\n```javascript\nimport Semaphore from 'semaphore-async-await';\n\n(async () => {\n\n  // A Semaphore with one permit is a lock\n  const lock = new Semaphore(1);\n\n  // Helper function used to wait for the given number of milliseconds\n  const wait = (ms) => new Promise(r => setTimeout(r, ms));\n\n  let globalVar = 0;\n\n  (async () => {\n    // This waits (without blocking the event loop) until a permit becomes available\n    await lock.wait();\n    const localCopy = globalVar;\n    await wait(500);\n    globalVar = localCopy + 1;\n    // Signal releases the lock and lets other things run\n    lock.signal();\n  })();\n\n  // This returns false because the function above has acquired the lock\n  // and is scheduled to continue executing once the main function yields or\n  // returns\n  console.log(lock.tryAcquire() === false);\n\n  // Similar to the function above but using waitFor instead of wait. We\n  // give it five seconds to wait which is enough time for it to acquire\n  // the lock\n  (async () => {\n    // This waits for at least five seconds, trying to acquire a permit.\n    const didAcquireLock = await lock.waitFor(5000);\n    if (didAcquireLock) {\n      const localCopy = globalVar;\n      await wait(500);\n      globalVar = localCopy + 1;\n      // Signal releases the lock and lets other things run\n      lock.signal();\n    }\n  })();\n\n  // Alternative to using wait()/signal() directly\n  lock.execute(async () => {\n    const localCopy = globalVar;\n    await wait(500);\n    globalVar = localCopy + 1;\n  });\n\n  // Wait for everything to finish\n  await wait(2000);\n\n  console.log(globalVar === 3);\n})();\n```\n\n## License\nMIT\n","_attachments":{},"homepage":"https://github.com/jsoendermann/semaphore-async-await","bugs":{"url":"https://github.com/jsoendermann/semaphore-async-await/issues"},"license":"MIT"}