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

shishua

v1.0.4

Published

SHISHUA: The fastest PRNG. A seedrandom-compatible random number generator.

Readme

SHISHUA for Node.js: The fastest PRNG

The official page for SHISHUA is here.
This npm package provides bindings for Node.js.

const shishua = require('shishua');
const buffer = Buffer.alloc(1 << 30);  // 1 GiB
shishua().fill(buffer);                // ~100ms on my laptop.

The package is API-compatible with seedrandom, so that you can use it with the random library:

const random = require('random');
random.use(shishua('seed'));

// Build a Poisson sampling.
const poissonSample = random.poisson();
new Array(12).fill(0).map(poissonSample)

API

shishua(seed, options, callback)

Returns a function that produces random floating-point values between 0 (included) and 1 (excluded).

The seed determines the sequence of numbers that this function returns:

new Array(3).fill(0).map(shishua('seed').int32)
// [ 1534767448, 1726267546, 2477584171 ]
new Array(3).fill(0).map(shishua('seed').int32)
// [ 1534767448, 1726267546, 2477584171 ]
new Array(3).fill(0).map(shishua('different seed, different values').int32)
// [ 69339860, 2922872123, 3883034659 ]

The seed can be either:

  • A 32-byte Buffer, to map exactly to the functionality provided by the underlying SHISHUA algorithm,
  • A String, which is hashed into the 32-byte buffer,
  • If not provided (or undefined), a random seed is generated from the system's CSPRNG.

The other parameters, options and callback, are only there for compatibility with seedrandom.

Associated methods

The object returned by calling shishua() also has the following methods, which all tap into the stream generated by the seed:

  • .fill(buffer), which fills a provided buffer with random bytes,
  • .int32(), which generates a uniformly random 32-bit number,
  • .double(), which produces a random floating-point value between 0 (included) and 1 (excluded),
  • .quick(), which also produces a random floating-point value between 0 (included) and 1 (excluded), but with only 32 bits of entropy.