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

View File

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

View File

@ -1,15 +1,14 @@
{ {
"name": "knuth-shuffle", "name": "knuth-shuffle",
"version": "1.0.8", "version": "1.0.1",
"description": "The Fisher-Yates (aka Knuth) shuffle for Browser and Node.js", "description": "The Fisher-Yates (aka Knuth) shuffle for Browser and Node.js",
"main": "index.js", "main": "index.js",
"homepage": "https://git.coolaj86.com/coolaj86/knuth-shuffle.js",
"scripts": { "scripts": {
"test": "node example.js" "test": "node example.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://git.coolaj86.com:coolaj86/knuth-shuffle.js.git" "url": "git://github.com/coolaj86/knuth-shuffle.git"
}, },
"keywords": [ "keywords": [
"ronald", "ronald",
@ -25,9 +24,9 @@
"unbiased", "unbiased",
"algorithm" "algorithm"
], ],
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com/)", "author": "AJ ONeal <coolaj86@gmail.com> (http://coolaj86.info/)",
"license": "(MIT OR Apache-2.0)", "license": "Apache2",
"bugs": { "bugs": {
"url": "https://git.coolaj86.com/coolaj86/knuth-shuffle/issues" "url": "https://github.com/coolaj86/knuth-shuffle/issues"
} }
} }