New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unique-random

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unique-random

Generate random numbers that are consecutively unique

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
48K
decreased by-1.44%
Maintainers
1
Weekly downloads
 
Created
Source

unique-random Build Status

Generate random numbers that are consecutively unique.

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

Install

$ npm install --save unique-random

Usage

var rand = require('unique-random')(1, 10);
console.log(rand(), rand(), rand());
//=> 5 2 6

API

uniqueRandom(min, max)

Returns a function which when called will return a random number that's never the same as the previous number.

License

MIT © Sindre Sorhus

Keywords

FAQs

Package last updated on 13 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc