This code is now located in our monorepo here
A drop-in replacement for the Meteor random package. Unlike the Meteor package, you can use this either with or without Meteor.
npm i --save @reactioncommerce/random
import Random from "@reactioncommerce/random";
const id = Random.id();
See Meteor package documentation
The meteor-random NPM package ported Meteor's random package a few years back. This has the latest updates, modernized code, and tests.