@thi.ng/idgen
Advanced tools
Comparing version 2.2.40 to 2.2.41
# Change Log | ||
- **Last updated**: 2024-04-23T07:02:18Z | ||
- **Last updated**: 2024-05-08T18:24:32Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -5,0 +5,0 @@ |
@@ -8,4 +8,3 @@ var __defProp = Object.defineProperty; | ||
result = (kind ? decorator(target, key, result) : decorator(result)) || result; | ||
if (kind && result) | ||
__defProp(target, key, result); | ||
if (kind && result) __defProp(target, key, result); | ||
return result; | ||
@@ -104,4 +103,3 @@ }; | ||
const id = ids[i]; | ||
if ((id & mask) === i) | ||
yield id; | ||
if ((id & mask) === i) yield id; | ||
} | ||
@@ -145,4 +143,3 @@ } | ||
free(id) { | ||
if (!this.has(id)) | ||
return false; | ||
if (!this.has(id)) return false; | ||
this.ids[id & this.mask] = this._freeID; | ||
@@ -149,0 +146,0 @@ this._freeID = this.nextVersion(id); |
@@ -8,4 +8,3 @@ var __defProp = Object.defineProperty; | ||
result = (kind ? decorator(target, key, result) : decorator(result)) || result; | ||
if (kind && result) | ||
__defProp(target, key, result); | ||
if (kind && result) __defProp(target, key, result); | ||
return result; | ||
@@ -33,4 +32,3 @@ }; | ||
free(id) { | ||
if (!(id >= this.start && id < this.nextID)) | ||
return false; | ||
if (!(id >= this.start && id < this.nextID)) return false; | ||
this.notify({ id: EVENT_REMOVED, target: this, value: id }); | ||
@@ -37,0 +35,0 @@ return true; |
{ | ||
"name": "@thi.ng/idgen", | ||
"version": "2.2.40", | ||
"version": "2.2.41", | ||
"description": "Generator of opaque numeric identifiers with optional support for ID versioning and efficient re-use", | ||
@@ -39,11 +39,11 @@ "type": "module", | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.1", | ||
"@thi.ng/errors": "^2.5.6", | ||
"@thi.ng/api": "^8.11.2", | ||
"@thi.ng/errors": "^2.5.7", | ||
"tslib": "^2.6.2" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.43.0", | ||
"esbuild": "^0.20.2", | ||
"typedoc": "^0.25.12", | ||
"typescript": "^5.4.3" | ||
"@microsoft/api-extractor": "^7.43.2", | ||
"esbuild": "^0.21.1", | ||
"typedoc": "^0.25.13", | ||
"typescript": "^5.4.5" | ||
}, | ||
@@ -93,3 +93,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n" | ||
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n" | ||
} |
@@ -8,4 +8,3 @@ var __defProp = Object.defineProperty; | ||
result = (kind ? decorator(target, key, result) : decorator(result)) || result; | ||
if (kind && result) | ||
__defProp(target, key, result); | ||
if (kind && result) __defProp(target, key, result); | ||
return result; | ||
@@ -12,0 +11,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38112
440
Updated@thi.ng/api@^8.11.2
Updated@thi.ng/errors@^2.5.7