{"_id":"number-allocator","_rev":"2994124","name":"number-allocator","description":"A library for the unique number allocator","dist-tags":{"latest":"1.0.14"},"maintainers":[{"name":"redboltz","email":""}],"time":{"modified":"2023-08-28T09:19:17.000Z","created":"2021-02-01T10:19:42.611Z","1.0.14":"2023-01-23T09:40:20.680Z","1.0.13":"2023-01-23T09:33:26.711Z","1.0.12":"2022-09-07T06:36:19.251Z","1.0.11":"2022-08-29T06:07:47.651Z","1.0.10":"2022-03-01T03:17:38.260Z","1.0.9":"2022-01-05T04:37:32.378Z","1.0.8":"2021-12-29T08:30:10.916Z","1.0.7":"2021-04-17T10:03:37.793Z","1.0.6":"2021-02-10T12:47:39.415Z","1.0.5":"2021-02-07T04:20:42.010Z","1.0.4":"2021-02-01T10:19:42.611Z"},"users":{},"author":{"name":"Takatoshi Kondo"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"versions":{"1.0.14":{"name":"number-allocator","version":"1.0.14","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"debug":"^4.3.1","js-sdsl":"4.3.0"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^10.2.0","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"a275c95794345466b5bb6b86e055cc3119d2ad10","_id":"number-allocator@1.0.14","_nodeVersion":"19.4.0","_npmVersion":"9.2.0","dist":{"shasum":"1f2e32855498a7740dcc8c78bed54592d930ee4d","size":7184,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.14.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.14.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.14_1674466820504_0.671819374743253"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-23T09:40:20.680Z","publish_time":1674466820680,"_cnpm_publish_time":1674466820680},"1.0.13":{"name":"number-allocator","version":"1.0.13","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"debug":"^4.3.1","js-sdsl":"4.3.0"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^10.2.0","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"dc9806445e4cab165b1e9b74f46b404dee685bcd","_id":"number-allocator@1.0.13","_nodeVersion":"19.4.0","_npmVersion":"9.2.0","dist":{"shasum":"3805a8b0907052da843e3ed6977ecb12587ce372","size":7178,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.13.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.13.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.13_1674466406533_0.5458236049032845"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-23T09:33:26.711Z","publish_time":1674466406711,"_cnpm_publish_time":1674466406711},"1.0.12":{"name":"number-allocator","version":"1.0.12","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"debug":"^4.3.1","js-sdsl":"4.1.4"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"a6a93b86338604a9823b9303fd948fe404ba2976","_id":"number-allocator@1.0.12","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"shasum":"f2c94501df7bcb32aff03e95bd34cffa96af9685","size":7066,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.12.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.12.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.12_1662532579070_0.9758972773978858"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T06:39:18.600Z","publish_time":1662532579251,"_cnpm_publish_time":1662532579251},"1.0.11":{"name":"number-allocator","version":"1.0.11","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"debug":"^4.3.1","js-sdsl":"^4.1.3"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"19b8f57bbfa54d36c21ef4e028c4d0c3d8817a0a","_id":"number-allocator@1.0.11","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"shasum":"46ed259eb40830f03962da79cc3e28aa4e3e057c","size":7143,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.11.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.11_1661753267464_0.6123688137926839"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-29T06:09:20.832Z","publish_time":1661753267651,"_cnpm_publish_time":1661753267651},"1.0.10":{"name":"number-allocator","version":"1.0.10","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"debug":"^4.3.1","js-sdsl":"^2.1.2"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"9bfe5095dfc69c8921a44d5789b8e3248fc75d56","_id":"number-allocator@1.0.10","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"shasum":"efc4c665e45bf60f0ad172aca1540e093b5292e8","size":7133,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.10.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.10_1646104658127_0.18143587022834895"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-01T03:17:43.808Z","publish_time":1646104658260,"_cnpm_publish_time":1646104658260},"1.0.9":{"name":"number-allocator","version":"1.0.9","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"debug":"^4.3.1","js-sdsl":"^2.1.2"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"e66fead536f2756de215101b63cf05bdc6e6e05c","_id":"number-allocator@1.0.9","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"shasum":"6f8fc46c3e6c90f6175ac7daf3b8f74ff786ba03","size":7103,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.9.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.9_1641357452225_0.7265940035671001"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-05T04:37:38.091Z","publish_time":1641357452378,"_cnpm_publish_time":1641357452378},"1.0.8":{"name":"number-allocator","version":"1.0.8","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"collections":"^5.1.13","debug":"^4.3.1"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"af3e1542b01910626aa9237f0ebb8f2493c2a288","_id":"number-allocator@1.0.8","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"shasum":"b7493de1cac628472aba48666c000f70a5d37280","size":7072,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.8.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.8_1640766610701_0.34387882219846033"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-29T08:30:20.807Z","publish_time":1640766610916,"_cnpm_publish_time":1640766610916},"1.0.7":{"name":"number-allocator","version":"1.0.7","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"collections":"^5.1.12","debug":"^4.3.1"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"b1b35715b284aec9dad7671f23409db8ac18db94","_id":"number-allocator@1.0.7","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"88842573d36453f3936f2e1f8cd8023d824ca0c0","size":7034,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.7.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.7_1618653817571_0.6372944403247647"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-21T07:56:25.474Z","publish_time":1618653817793,"_cnpm_publish_time":1618653817793},"1.0.6":{"name":"number-allocator","version":"1.0.6","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","keywords":["unique","number","id","value","allocator"],"bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"collections":"^5.1.12","debug":"^4.3.1"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"a4c2d9fe1f4a84454282ff758840730827c003cb","_id":"number-allocator@1.0.6","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"6279806149dbfa6db3c97adb4498d06fea29bb1b","size":7022,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.6.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.6_1612961259320_0.7598153132845067"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-21T07:56:24.518Z","publish_time":1612961259415,"_cnpm_publish_time":1612961259415},"1.0.5":{"name":"number-allocator","version":"1.0.5","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"collections":"^5.1.12","debug":"^4.3.1"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"fccf339711f30b707b46832932b59b5ff2ec2297","_id":"number-allocator@1.0.5","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"e5bda011e5cf158769ebb4b0fc5ccb35f0760efa","size":6976,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.5.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.5_1612671641824_0.4691527353180869"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-21T07:56:23.635Z","publish_time":1612671642010,"_cnpm_publish_time":1612671642010},"1.0.4":{"name":"number-allocator","version":"1.0.4","description":"A library for the unique number allocator","main":"index.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"test":"nyc --reporter=lcov --reporter=text ./node_modules/mocha/bin/_mocha","pretest":"standard ./*.js ./lib/**/*.js ./test/*.js | snazzy","codecov":"codecov","browser-build":"rimraf dist/ && mkdirp dist/ && browserify index.js --standalone number-allocator > dist/number-allocator.js && uglifyjs dist/number-allocator.js --compress --mangle --output dist/number-allocator.min.js","typescript-compile-test":"tsc -p test/typescript/tsconfig.json","typescript-compile-execute":"node test/typescript/*.js","typescript-test":"npm run typescript-compile-test && npm run typescript-compile-execute","test-web":"karma start","generate-docs":"jsdoc -d docs lib"},"repository":{"type":"git","url":"git+https://github.com/redboltz/number-allocator.git"},"author":{"name":"Takatoshi Kondo"},"license":"MIT","bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"homepage":"https://github.com/redboltz/number-allocator#readme","dependencies":{"collections":"^5.1.12"},"devDependencies":{"airtap":"^4.0.1","browserify":"^17.0.0","chai":"^4.2.0","codecov":"^3.8.1","eslint":"^7.18.0","eslint-config-standard":"16.0.2","jsdoc":"^3.6.6","karma":"^6.0.3","karma-browserify":"^8.0.0","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","mocha":"^8.2.1","nyc":"^15.1.0","snazzy":"^9.0.0","standard":"^16.0.3","tslint":"^5.11.0","tslint-config-standard":"^9.0.0","typescript":"^4.1.3","uglify-es":"^3.3.9"},"standard":{"env":["mocha"]},"gitHead":"2b5493990d3f7c5009c4efbe0051ee254d2ee2c4","_id":"number-allocator@1.0.4","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"65a59e499a484816e1b2ed9beb1f9185f7c205cc","size":6695,"noattachment":false,"key":"/number-allocator/-/number-allocator-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/number-allocator/download/number-allocator-1.0.4.tgz"},"_npmUser":{"name":"redboltz","email":"redboltz@gmail.com"},"maintainers":[{"name":"redboltz","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/number-allocator_1.0.4_1612174782472_0.15158431207753909"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-21T07:56:22.755Z","publish_time":1612174782611,"_cnpm_publish_time":1612174782611}},"readme":"# Unique number allocator for JavaScript.\n\nVersion 1.0.14 [![number-allocator CI](https://github.com/redboltz/number-allocator/workflows/number-allocator%20CI/badge.svg)](https://github.com/redboltz/number-allocator/actions) [![codecov](https://codecov.io/gh/redboltz/number-allocator/branch/main/graph/badge.svg)](https://codecov.io/gh/redboltz/number-allocator)\n\n## How to use\n\n```js\nconst NumberAllocator = require('number-allocator').NumberAllocator\n\n// Construct a NumerAllocator that has [0-10] numbers.\n// All numbers are vacant.\nconst a = new NumberAllocator(0, 10)\n\n// Allocate the least vacant number.\nconst num0 = a.alloc()\nconsole.log(num0) // 0\n\n// Allocate the least vacant number.\nconst num1 = a.alloc()\nconsole.log(num1) // 1\n\n// Use any vacant number.\nconst ret1 = a.use(5) // 5 is marked as used(occupied) in the NumberAllocator.\nconsole.log(ret1) // true\n\n// If use the used number, then return false.\nconst ret2 = a.use(1) // 1 has already been used, then return false\nconsole.log(ret2) // false\n\n// Free the used number.\na.free(1)\n// Now 1 becomes vacant again.\n\nconst ret3 = a.use(1)\nconsole.log(ret3) // true\n\n// Get the lowest vacant number without marking used.\nconst num2 = a.firstVacant()\nconsole.log(num2) // 2\n\n// Clear all used mark. Now [0-10] are allocatable again.\na.clear()\n```\n\n## Reference\n\n### NumberAllocator(min, max)\nConstructor\n\n- min: Number\n   - The maximum number of allocatable. The number must be integer.\n- max: Number\n   - The minimum number of allocatable. The number must be integer.\n\nThe all numbers are set to vacant status.\n\nTime Complexity O(1)\n\n### firstVacant()\nGet the first vacant number. The status of the number is not updated.\n\nTime Complexity O(1)\n\n- return: Number\n   - The first vacant number. If all numbers are occupied, return null.\n     When alloc() is called then the same value will be allocated.\n\n### alloc()\nAllocate the first vacant number. The number become occupied status.\n\nTime Complexity O(1)\n\n- return: Number\n   - The first vacant number. If all numbers are occupied, return null.\n\n### use(num)\nUse the number. The number become occupied status.\n\nIf the number has already been occupied, then return false.\n\nTime Complexity O(logN) : N is the number of intervals (not numbers)\n\n- num: Number\n   - The number to request use.\n- return: Boolean\n   - If `num` was not occupied, then return true, otherwise return false.\n\n### free(num)\nDeallocate the number. The number become vacant status.\n\nTime Complexity O(logN) : N is the number of intervals (not numbers)\n\n- num: Number\n   - The number to deallocate. The number must be occupied status.\n     In other words, the number must be allocated by alloc() or occupied be use().\n\n### clear()\nClear all occupied numbers.\nThe all numbers are set to vacant status.\nTime Complexity O(1)\n\n### intervalCount()\nGet the number of intervals. Interval is internal structure of this library.\n\nThis function is for debugging.\n\nTime Complexity O(1)\n\n- return: Number\n   - The number of intervals.\n\n### dump()\nDump the internal structor of the library.\n\nThis function is for debugging.\n\nTime Complexity O(N) : N is the number of intervals (not numbers)\n\n## Internal structure\nNumberAllocator has a sorted-set of Interval.\n\nInterval has `low` and `high` property.\n\nI use `[low-high]` notation to describe Interval.\n\nWhen NumberAllocator is constructed, it has only one Interval(min, max).\n\nLet's say `new NumberAllocator(1, 9)` then the internal structure become as follows:\n\n```\n[1-------9]\n```\n\nWhen `alloc()` is called, the first Interval.low is returned.\n\nAnd then the interval is shrinked.\n\n```\nalloc()\nreturn 1\n [2------9]\n```\n\nWhen `use(5)` is called, the interval is separated to the two intervals.\n\n```\nuse(5)\n [2-4] [6--9]\n```\n\nWhen `alloc()` is called again, the first Interval.low is returned.\n\nAnd then the interval is shrinked.\n\n```\nalloc()\nreturn 2\n  [3-4] [6--9]\n```\n\nWhen `free(1)` is called. the interval is inseted.\n\n```\nfree(1)\n[1]  [3-4] [6--9]\n```\n\nWhen `free(2)` is called. the interval is inseted.\n\nAnd check the left and right intervals. If they are continuours, then concatinate to them.\n\n```\nfree(1)\n[1][2][3-4] [6--9]\n[1-------4] [6--9]\n```\n\nWhen `clear()` is called, then reset the interval as follows:\n\n```\n[1-------9]\n```\n\nWhen `intervalCount()` is called, then the number of intervals is retuned.\n\nIn the following case, return 3.\n\n```\nintervalCount()\nreturn 3\n[1]  [3-4] [6--9]\n```\n\nInterval management (insertion/concatination/shrinking) is using efficient way.\nInsert/Delete operation to sorted-set is minimized.\nSome of operations requires O(logN) time complexity. N is number of intervals.\nIf the maximum count of allocatable values is M, N is at most floor((M + 1) / 2),\n\nIn this example, M is 9 so N is at most 5 as follows:\n\n```\n[1] [3] [5] [7] [9]\n```\n","_attachments":{},"homepage":"https://github.com/redboltz/number-allocator#readme","bugs":{"url":"https://github.com/redboltz/number-allocator/issues"},"license":"MIT"}