Skip to content

v2.0.0

Compare
Choose a tag to compare
@lukeed lukeed released this 29 Oct 17:23
· 8 commits to master since this release

Breaking

  • Replaced default export with named uid export: 6c52bbd
    -- import uid from 'uid';
    ++ import { uid } from 'uid';

Features

  • Performance! 🎉 b364839, 00b528b
    The main uid module is now up to 12x faster than the 1.0 release!
    Please see here for reasons why.

  • NEW uid/secure mode: e191043
    Offers a cryptographically secure mode (CSPRNG) via the current environment's crypto module.
    _Works with Node.js and all browsers with crypto.getRandomValues() support.

  • NEW uid/single mode: ff63971
    Offers an implementation that does not maintain an internal cache, which makes it ideal for short-lived environments.
    Relies on Math.random (not CSPRNG) but works in all Node.js and all browsers.

  • Add native ESM support via exports map: 1d6923e

Chores