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

@-silver/random-rng

v1.0.1

Published

Random assortment of RNG-based functions.

Readme

random-rng

Random assortment of RNG-based functions. You never needed this, but now you have it.

Installing

I prefer require() but I don't care what you use.

const { ... } = require("random-rng")
import { ... } from 'random-rng'

Usage

odds

Uses a number through 1 - 99 to use as a percentage in RNG.

Example

const { odds } = require("random-rng")

if (odds(15)) { // 15% of the time
  console.log("You win!")
} else {
  console.log("You lose...")
}

gen_word

Generates a random word that may or may not be real. (we don't know)

Example

const { gen_word } = require("random-rng")

if (gen_word() == "hi") { // pretty small chance
  console.log("Hello!!")
} else {
  console.log("???????")
}

gen_sentence

Generates a random sentence with random punctuation and random words. I'm going to admit this uses gen_word.

len - Length of the sentence in words.

Example

const { gen_sentence } = require("random-rng")

// possible social app code

if (user.new) {
  user.bio = gen_sentence(8) // generates a random 8 sentence bio.
}

gen_paragraph

Generates a full-blown paragraph using gen_word and gen_sentence. This was made for fun.

min - Minimum length of a sentence in words. max - Maximum length of a sentence in words. len - The amount of sentences in the paragraph.

Example

const { gen_paragraph } = require("random-rng")

// possible showcase app here

app.box[92].content = gen_paragraph() // generates filler text for box 92.

gen_title

Generates a title for a movie, a video game, I don't know. Some combinations might be- uh... mature.

Example

const { gen_title } = require("random-rng")

// possible book creation code here

book.filler_title = gen_title() // generates a filler title that the user can change (if they want to)

Have fun.