npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@1fun-oss/rng

v1.0.1

Published

This repository implements a cryptographically secure Random Number Generator (RNG) built on **HMAC-DRBG** (Deterministic Random Bit Generator).

Readme

GLI-19 Compliant Cryptographically Secure Pseudo Random Number Generator (RNG)

This repository implements a cryptographically secure Random Number Generator (RNG) built on HMAC-DRBG (Deterministic Random Bit Generator).

The project follows the technical requirements from GLI-19 Chapter 3: Random Number Generator (RNG) Requirements.

This implementation is designed as production-ready RNG code and can be submitted for GLI / iTech Labs certification.

Structure

  • cli - CLI tools for generating test data
  • examples - Example usage of the RNG
  • src/hmac-drbg - HMAC-DRBG implementation
  • src/rng - Shuffling, scaling and draw utilities
  • src/utils - Some helpful utilities

Dieharder Docker

This project includes a Dockerfile with dieharder.

docker build -t 1fun-rng .
docker run -it --rm 1fun-rng

⚠️ Note on Dieharder Testing
Some statistical tests in the Dieharder suite are very data-hungry.
To achieve a full "PASSED" status across all tests, a large amount of RNG output data may be required.
This is expected behavior since certain tests need millions or even billions of samples to converge reliably.

Generate ASCII output to txt file for usage with dieharder

npx ts-node ./cli/generate-dieharder-ascii.ts \
  --server-seed abcdefghijklmnopqrstuvwxyz \
  --client-seed abcdefghijklmnopqrstuvwxyz \
  --count 2684354560 \
  --destination data/hmac-dbrng.txt

This creates a file hmac-dbrng.txt with 2 684 354 560 uint32 values generated with the HMAC-DRBG algorithm.

It can be used with the dieharder test suite:

dieharder -g 202 -f data/hmac-dbrng.txt -a

Generate raw output to bin file for usage with dieharder

npx ts-node ./cli/generate-dieharder-bin.ts \
  --server-seed abcdefghijklmnopqrstuvwxyz \
  --client-seed abcdefghijklmnopqrstuvwxyz \
  --count 2684354560 \
  --destination data/hmac-dbrng.bin

This creates a file hmac-dbrng.bin with 2 684 354 560 uint32 values (10GiB of data) generated with the HMAC-DRBG algorithm.

It can be used with the dieharder test suite:

dieharder -g 201 -f data/hmac-dbrng.bin -a

Generate output to txt file for GLI

npx ts-node ./cli/generate-gli-output.ts \
  --server-seed abcdefghijklmnopqrstuvwxyz \
  --client-seed abcdefghijklmnopqrstuvwxyz \
  --range-start 1 \
  --range-end 52 \
  --selections 52 \
  --draws 100000 \
  --destination data/gli.txt

The additional parameter --with-replacements allows for numbers to be repeated within selections.

range-start and range-end are inclusive

Acknowledgements

This project draws ideas and inspiration (and in some cases code concepts) from the following open-source projects: