unique-random
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60
2359
1