Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c60dcd6828 | ||
|
|
82f2c9065f | ||
|
|
813da458f9 | ||
|
|
282952b4e5 | ||
|
|
934ce950f0 | ||
|
|
faad2e1697 | ||
|
|
6cf39d6dc0 | ||
|
|
124fab7c94 | ||
|
|
d783bc493e | ||
|
|
27f1186b2f | ||
|
|
9cecd855f3 | ||
|
|
b05104798b | ||
|
|
6725c2f4f5 | ||
| 1249f4db3a | |||
|
|
6441602cfb | ||
|
|
d75ab95153 | ||
|
|
e23b582738 | ||
|
|
6c04873067 |
22
README.md
22
README.md
@ -34,9 +34,8 @@ Browser Example
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var a = [2,11,37,42]
|
||||
, b
|
||||
;
|
||||
var a = [2,11,37,42];
|
||||
var b;
|
||||
|
||||
// The shuffle modifies the original array
|
||||
// calling a.slice(0) creates a copy, which is assigned to b
|
||||
@ -48,18 +47,25 @@ Browser Example
|
||||
Node Example
|
||||
===
|
||||
|
||||
Decentralized Install
|
||||
|
||||
```bash
|
||||
npm install -S knuth-shuffle
|
||||
npm install --save git+https://git.coolaj86.com/coolaj86/knuth-shuffle.js.git#v1.0
|
||||
```
|
||||
|
||||
Centralized Install
|
||||
|
||||
```bash
|
||||
npm install --save knuth-shuffle@1.0
|
||||
```
|
||||
|
||||
```javascript
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var shuffle = require('knuth-shuffle').knuthShuffle
|
||||
, a = [2,11,37,42]
|
||||
, b
|
||||
;
|
||||
var shuffle = require('knuth-shuffle').knuthShuffle;
|
||||
var a = [2,11,37,42];
|
||||
var b;
|
||||
|
||||
// The shuffle modifies the original array
|
||||
// calling a.slice(0) creates a copy, which is assigned to b
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "knuth-shuffle",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.8",
|
||||
"main": "index.js",
|
||||
"ignore": [
|
||||
".jshintrc"
|
||||
, "package.json"
|
||||
".jshintrc",
|
||||
"package.json"
|
||||
],
|
||||
"dependencies": {},
|
||||
"devDependencies": {}
|
||||
|
||||
11
package.json
11
package.json
@ -1,14 +1,15 @@
|
||||
{
|
||||
"name": "knuth-shuffle",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.8",
|
||||
"description": "The Fisher-Yates (aka Knuth) shuffle for Browser and Node.js",
|
||||
"main": "index.js",
|
||||
"homepage": "https://git.coolaj86.com/coolaj86/knuth-shuffle.js",
|
||||
"scripts": {
|
||||
"test": "node example.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/coolaj86/knuth-shuffle.git"
|
||||
"url": "git://git.coolaj86.com:coolaj86/knuth-shuffle.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"ronald",
|
||||
@ -24,9 +25,9 @@
|
||||
"unbiased",
|
||||
"algorithm"
|
||||
],
|
||||
"author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info/)",
|
||||
"license": "Apache2",
|
||||
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"bugs": {
|
||||
"url": "https://github.com/coolaj86/knuth-shuffle/issues"
|
||||
"url": "https://git.coolaj86.com/coolaj86/knuth-shuffle/issues"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user