0.0.9 • Published 6 months ago

@elonehoo/only-random v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

only-random

NPM version

Generate random numbers that are consecutively unique

Useful for things like slideshows where you don't want to have the same slide twice in a row.

install

# npm
npm install --save @elonehoo/only-random
# yarn
yarn add --save @elonehoo/only-random
# pnpm
pnpm install --save @elonehoo/only-random

usage

import onlyRandom from '@elonehoo/only-random'

const random = onlyRandom(1, 10)

console.log(random(), random(), random())

API

onlyRandom(minimum:number, maximum:number)

Returns a function, that when called, will return a random number that is never the same as the previous.

0.0.9

6 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago