Huge News!Announcing our $40M Series B led by Abstract Ventures.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 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

9

package.json
{
"name": "unique-random",
"version": "0.1.0",
"version": "0.1.1",
"description": "Generate random numbers that are consecutively unique",

@@ -24,6 +24,3 @@ "keywords": [

"main": "unique-random",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/unique-random.git"
},
"repository": "sindresorhus/unique-random",
"scripts": {

@@ -33,3 +30,3 @@ "test": "mocha"

"devDependencies": {
"mocha": "~1.14.0"
"mocha": "*"
},

@@ -36,0 +33,0 @@ "engines": {

@@ -1,2 +0,2 @@

# unique-random [![Build Status](https://secure.travis-ci.org/sindresorhus/unique-random.png?branch=master)](http://travis-ci.org/sindresorhus/unique-random)
# unique-random [![Build Status](https://travis-ci.org/sindresorhus/unique-random.svg?branch=master)](https://travis-ci.org/sindresorhus/unique-random)

@@ -12,29 +12,37 @@ > Generate random numbers that are consecutively unique.

#### [npm](https://npmjs.org/package/unique-random)
```bash
$ npm install --save unique-random
```
```bash
$ bower install --save unique-random
```
npm install --save unique-random
```bash
$ component install sindresorhus/unique-random
```
#### [Bower](http://bower.io)
```
bower install --save unique-random
```
## Usage
#### [Component](https://github.com/component/component)
Generate a random number between 1 and 10.
### Node.js
```js
var rand = require('unique-random')(1, 10);
console.log(rand(), rand(), rand());
//=> 5 2 6
```
component install sindresorhus/unique-random
```
### Bower
## Example
```html
<script src="bower_components/unique-random/unique-random.js"></script>
```
Using Node.js. Will generate a random number between 1 and 10.
```js
var uniqueRandom = require('unique-random')(1, 10);
console.log(uniqueRandom(), uniqueRandom(), uniqueRandom());
// 5 2 6
var rand = uniqueRandom(1, 10);
console.log(rand(), rand(), rand());
//=> 5 2 6
```

@@ -52,2 +60,2 @@

MIT © [Sindre Sorhus](http://sindresorhus.com)
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)
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