New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scru128

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scru128 - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

7

CHANGELOG.md
# Changelog
## v3.0.4 - 2023-09-18
### Maintenance
- Improved documentation about generator's clock rollback behavior
- Updated dev dependencies
## v3.0.3 - 2023-08-01

@@ -4,0 +11,0 @@

19

dist/index.d.ts

@@ -173,3 +173,3 @@ /**

* @remarks
* The generator offers four different methods to generate a SCRU128 ID:
* The generator comes with four different methods that generate a SCRU128 ID:
*

@@ -183,9 +183,12 @@ * | Flavor | Timestamp | On big clock rewind |

*
* All of these methods return monotonically increasing IDs unless a `timestamp`
* provided is significantly (by default, more than ten seconds) smaller than
* the one embedded in the immediately preceding ID. If such a significant clock
* rollback is detected, the `generate` (OrReset) method resets the generator
* and returns a new ID based on the given `timestamp`, while the `OrAbort`
* variants abort and return `undefined`. The `Core` functions offer low-level
* primitives.
* All of the four return a monotonically increasing ID by reusing the previous
* `timestamp` even if the one provided is smaller than the immediately
* preceding ID's. However, when such a clock rollback is considered significant
* (by default, more than ten seconds):
*
* 1. `generate` (OrReset) methods reset the generator and return a new ID based
* on the given `timestamp`, breaking the increasing order of IDs.
* 2. `OrAbort` variants abort and return `undefined` immediately.
*
* The `Core` functions offer low-level primitives to customize the behavior.
*/

@@ -192,0 +195,0 @@ export declare class Scru128Generator {

@@ -381,3 +381,3 @@ /**

* @remarks
* The generator offers four different methods to generate a SCRU128 ID:
* The generator comes with four different methods that generate a SCRU128 ID:
*

@@ -391,9 +391,12 @@ * | Flavor | Timestamp | On big clock rewind |

*
* All of these methods return monotonically increasing IDs unless a `timestamp`
* provided is significantly (by default, more than ten seconds) smaller than
* the one embedded in the immediately preceding ID. If such a significant clock
* rollback is detected, the `generate` (OrReset) method resets the generator
* and returns a new ID based on the given `timestamp`, while the `OrAbort`
* variants abort and return `undefined`. The `Core` functions offer low-level
* primitives.
* All of the four return a monotonically increasing ID by reusing the previous
* `timestamp` even if the one provided is smaller than the immediately
* preceding ID's. However, when such a clock rollback is considered significant
* (by default, more than ten seconds):
*
* 1. `generate` (OrReset) methods reset the generator and return a new ID based
* on the given `timestamp`, breaking the increasing order of IDs.
* 2. `OrAbort` variants abort and return `undefined` immediately.
*
* The `Core` functions offer low-level primitives to customize the behavior.
*/

@@ -400,0 +403,0 @@ export class Scru128Generator {

{
"name": "scru128",
"version": "3.0.3",
"version": "3.0.4",
"description": "SCRU128: Sortable, Clock and Random number-based Unique identifier",

@@ -41,5 +41,5 @@ "type": "module",

"mocha": "^10.2.0",
"typedoc": "^0.24.8",
"typescript": "^5.1.6"
"typedoc": "^0.25.1",
"typescript": "^5.2.2"
}
}
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