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 🙏

© 2024 – Pkg Stats / Ryan Hefner

random-everything

v1.2.0

Published

A versatile npm package for generating random data of various types.

Downloads

44

Readme

Random Everything - The Ultimate Random Data Generator

Random Everything is a powerful and versatile npm package that allows you to generate random data of various types, making it an essential tool for developers, testers, and anyone in need of random values. From numbers to complex data structures, this package has it all.

Installation

npm install random-everything

Usage/Example

const randomGen = require('random-everything');

randomGen.number(min, max)

Description: Generates a random integer between min and max.

const randomNum = randomGen.number(1, 100);

randomGen.alphanumeric(length)

Description: Generates a random alphanumeric string of a specified length.

const randomString = randomGen.alphanumeric(10);

randomGen.decimal(min, max, decimals)

Description: Generates a random decimal number between min and max with a specified number of decimal places.

const randomDec = randomGen.decimal(1.5, 5.5, 2);

randomGen.date(format)

Description: Generates a random date in the specified format (DD/MM/YYYY, MM-DD-YY, etc.). The format is case-insensitive.

const randomDate = randomGen.date('DD-MM-YYYY');

randomGen.time()

Description: Generates a random time in the format HH:MM:SS.

const randomTime = randomGen.time();

randomGen.boolean()

Description: Generates a random boolean value (true or false).

const randomBool = randomGen.boolean();

randomGen.arrayElement(array)

Description: Returns a random element from the provided array.

const randomElem = randomGen.arrayElement(['apple', 'banana', 'cherry']);

randomGen.string(length)

Description: Generates a random string of alphabets only (no numbers).

const randomStr = randomGen.string(8);

randomGen.hexString(length)

Description: Generates a random hexadecimal string of the specified length.

const randomHex = randomGen.hexString(6);

randomGen.uuid()

Description: Generates a random UUID (version 4).

const randomUUID = randomGen.uuid();

randomGen.ipAddress()

Description: Generates a random IPv4 address.

const randomIP = randomGen.ipAddress();

randomGen.rgbColor()

Description: Generates a random RGB color value.

const randomColor = randomGen.rgbColor();

randomGen.password(length)

Description: Generates a random secure password of the specified length.

const randomPwd = randomGen.password(12);

randomGen.dnaSequence(length)

Description: Generates a random DNA sequence composed of A, T, C, G.

const randomDNA = randomGen.dnaSequence(50);

randomGen.mathExpression(terms)

Description: Generates a random mathematical expression with a specified number of terms.

const randomExpression = randomGen.mathExpression(3);

randomGen.emojiArt(width, height)

Description: Generates a random emoji art with specified width and height.

const randomArt = randomGen.emojiArt(5, 5);

randomGen.musicNoteSequence(length)

Description: Generates a random sequence of music notes.

const randomNotes = randomGen.musicNoteSequence(8);

randomGen.mandelbrotCoordinate()

Description: Generates random coordinates within the Mandelbrot set.

const randomCoord = randomGen.mandelbrotCoordinate();

randomGen.fantasyCreatureName()

Description: Generates a random fantasy creature name.

const randomCreature = randomGen.fantasyCreatureName();

randomGen.haiku()

Description: Generates a random haiku following the 5-7-5 syllable structure.

const randomHaiku = randomGen.haiku();

randomGen.constellationName()

Description: Generates a random constellation name.

const randomConstellation = randomGen.constellationName();

randomGen.secretCode()

Description: Generates a random secret code, suitable for espionage scenarios.

const randomCode = randomGen.secretCode();

randomGen.quantumState()

Description: Generates a random quantum state (simplified).

const randomQubit = randomGen.quantumState();

randomGen.paradox()

Description: Generates a random paradoxical statement.

const randomParadox = randomGen.paradox();

randomGen.infiniteLoop(language)

Description: Generates a humorous infinite loop example in a specified programming language.

const randomLoop = randomGen.infiniteLoop('JavaScript');

randomGen.alienPhrase()

Description: Generates a random phrase in a made-up alien language.

const randomAlien = randomGen.alienPhrase();

randomGen.artifactName()

Description: Generates a random name for a mythical artifact.

const randomArtifact = randomGen.artifactName();

randomGen.hypercubeCoordinate()

Description: Generates random coordinates in a 4D hypercube.

const randomHyperCube = randomGen.hypercubeCoordinate();