Socket
Socket
Sign inDemoInstall

scru64

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scru64 - npm Package Compare versions

Comparing version 0.3.0-beta.1 to 0.3.1

6

dist/index.d.ts

@@ -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 {

13

dist/index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc