Comparing version 0.3.0-beta.1 to 0.3.1
@@ -267,2 +267,8 @@ /** | ||
* global generator. | ||
* | ||
* The global generator reads the node configuration from the `SCRU64_NODE_SPEC` | ||
* global variable by default, and it throws an error if it fails to read a | ||
* well-formed node spec string (e.g., `"42/8"`, `"0xb00/12"`, | ||
* `"0u2r85hm2pt3/16"`) when a generator method is first called. See also | ||
* {@link NodeSpec} for the node spec string format. | ||
*/ | ||
@@ -269,0 +275,0 @@ export declare class GlobalGenerator { |
@@ -162,2 +162,4 @@ /** | ||
} | ||
// no further check is necessary because `MAX_SCRU64_INT` happens to equal | ||
// `MAX_TIMESTAMP << 24 | MAX_NODE_CTR` | ||
const bytes = new Uint8Array(8); | ||
@@ -172,6 +174,3 @@ bytes[0] = timestamp / 4294967296; | ||
bytes[7] = nodeCtr; | ||
// upper bound check is necessary when `timestamp` is at max | ||
return timestamp === MAX_TIMESTAMP | ||
? Scru64Id.ofInner(bytes) | ||
: new Scru64Id(bytes); | ||
return new Scru64Id(bytes); | ||
} | ||
@@ -539,2 +538,8 @@ /** Returns the `timestamp` field value. */ | ||
* global generator. | ||
* | ||
* The global generator reads the node configuration from the `SCRU64_NODE_SPEC` | ||
* global variable by default, and it throws an error if it fails to read a | ||
* well-formed node spec string (e.g., `"42/8"`, `"0xb00/12"`, | ||
* `"0u2r85hm2pt3/16"`) when a generator method is first called. See also | ||
* {@link NodeSpec} for the node spec string format. | ||
*/ | ||
@@ -541,0 +546,0 @@ export class GlobalGenerator { |
{ | ||
"name": "scru64", | ||
"version": "0.3.0-beta.1", | ||
"version": "0.3.1", | ||
"description": "SCRU64: Sortable, Clock-based, Realm-specifically Unique identifier", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
55774
1029