Catalog npm
PACKAGE EXPLORERView in registry

@-silver/random-rng

npm

Random assortment of RNG-based functions.

-silverchancerandomrngsilvxrcat
Versions collected2
Direct dependencies0From release 1.0.1
Last observed20 Oct, 21:49 UTC

README

Current package documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 2

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.1Registry latest2 Jun 20220
1.0.02 Jun 20220

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
silvxrcat/random-rng

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f5125cd40af90a3f964ba2469dc7fdafe3feabb874df616f4f45b495c9d0e95d