@dvlden/seeran
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Seeran

GitHub package.json version npm bundle size (scoped)

Seeran

Simple pseudorandom number generator that takes a seed as string or number. Written as a generator function that can be ran once or as many times as you need.

Check test cases if you are still wondering what it does.

Installation

Use your favourite package manager... In my case that's pnpm.

pnpm i @dvlden/seeran

Importing

ESM

import { seeran } from '@dvlden/seeran'

Node

const { seeran } = require('@dvlden/seeran')

Usage

// Basic
const { value } = seeran().next()

// With seed
const { value } = seeran('hello').next()

// Iteration
const sr = seeran('wow')

for (let i = 0; i < 10; i++) {
  console.log(sr.next().value)
}

Package Sidebar

Install

npm i @dvlden/seeran

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

9.65 kB

Total Files

8

Last publish

Collaborators

  • dvlden