Compare commits

..

No commits in common. "master" and "v1.0.1" have entirely different histories.

3 changed files with 16 additions and 23 deletions

View File

@ -34,8 +34,9 @@ Browser Example
(function () {
'use strict';
var a = [2,11,37,42];
var b;
var a = [2,11,37,42]
, b
;
// The shuffle modifies the original array
// calling a.slice(0) creates a copy, which is assigned to b
@ -47,25 +48,18 @@ Browser Example
Node Example
===
Decentralized Install
```bash
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
npm install -S knuth-shuffle
```
```javascript
(function () {
'use strict';
var shuffle = require('knuth-shuffle').knuthShuffle;
var a = [2,11,37,42];
var b;
var shuffle = require('knuth-shuffle').knuthShuffle
, a = [2,11,37,42]
, b
;
// The shuffle modifies the original array
// calling a.slice(0) creates a copy, which is assigned to b

View File

@ -1,10 +1,10 @@
{
"name": "knuth-shuffle",
"version": "1.0.8",
"version": "1.0.0",
"main": "index.js",
"ignore": [
".jshintrc",
"package.json"
".jshintrc"
, "package.json"
],
"dependencies": {},
"devDependencies": {}

View File

@ -1,15 +1,14 @@
{
"name": "knuth-shuffle",
"version": "1.0.8",
"version": "1.0.1",
"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://git.coolaj86.com:coolaj86/knuth-shuffle.js.git"
"url": "git://github.com/coolaj86/knuth-shuffle.git"
},
"keywords": [
"ronald",
@ -25,9 +24,9 @@
"unbiased",
"algorithm"
],
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)",
"license": "(MIT OR Apache-2.0)",
"author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info/)",
"license": "Apache2",
"bugs": {
"url": "https://git.coolaj86.com/coolaj86/knuth-shuffle/issues"
"url": "https://github.com/coolaj86/knuth-shuffle/issues"
}
}