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 Versions

134

2.3.2

Diff

Changelog

Source

v2.3.2 - 2023-03-19

Added

  • generateNoRewind() and generateCoreNoRewind() to Scru128Generator (experimental)

Changed

  • Precedence of PRNG selection in Node.js: Web Crypto first if available
    • node:crypto > Web Crypto > Math.random -> Web > node > Math

Maintenance

  • Improved documentation about generator method flavors
  • Updated dev dependencies
liosk
published 2.3.1 •

Changelog

Source

v2.3.1 - 2023-02-18

Added

  • Scru128Id#bytes, Scru128Id.ofInner(), and Scru128Id.fromBytes()

Maintenance

  • Updated dev dependencies
liosk
published 2.3.0 •

liosk
published 2.2.1 •

Changelog

Source

v2.2.1 - 2023-01-31

Added

  • CHANGELOG.md to NPM package

Maintenance

  • Adopted node16 module setting to build CommonJS entry point
  • Updated dev dependencies
liosk
published 2.2.0 •

Changelog

Source

v2.2.0 - 2022-12-25

Added

  • Iterable and Iterator implementations to Scru128Generator to make it work as infinite iterator

Maintenance

  • Updated dev dependencies
liosk
published 2.1.3 •

Changelog

Source

v2.1.3 - 2022-11-28

Maintenance

  • Updated dev dependencies
liosk
published 2.1.2 •

Changelog

Source

v2.1.2 - 2022-06-11

Fixed

  • generateCore() to update counter_hi when timestamp passed < 1000

Maintenance

  • Updated dev dependencies
liosk
published 2.1.1 •

Changelog

Source

v2.1.1 - 2022-05-23

Fixed

  • generateCore() to reject zero as timestamp value

Maintenance

  • Updated dev dependencies
liosk
published 2.1.0 •

Changelog

Source

v2.1.0 - 2022-05-22

Added

  • generateCore() and getLastStatus() to Scru128Generator

Maintenance

  • Updated dev dependencies
liosk
published 2.0.0 •

Changelog

Source

v2.0.0 - 2022-05-01

Changed

  • Textual representation: 26-digit Base32 -> 25-digit Base36
  • Field structure: { timestamp: 44 bits, counter: 28 bits, per_sec_random: 24 bits, per_gen_random: 32 bits } -> { timestamp: 48 bits, counter_hi: 24 bits, counter_lo: 24 bits, entropy: 32 bits }
  • Timestamp epoch: 2020-01-01 00:00:00.000 UTC -> 1970-01-01 00:00:00.000 UTC
  • Counter overflow handling: stall generator -> increment timestamp
  • Dual packaging method: CommonJS + ESM wrapper -> native ESM + isolate CommonJS

Removed

  • setLogger() as counter overflow is no longer likely to occur
  • TIMESTAMP_BIAS
  • Scru128Id#counter, Scru128Id#perSecRandom, Scru128Id#perGenRandom

Added

  • Scru128Id#counterHi, Scru128Id#counterLo, Scru128Id#entropy

Deprecated

  • CommonJS entry points
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