1
1
[ js-sort] ( http://aureooms.github.io/js-sort )
2
2
==
3
3
4
- Sorting code bricks for JavaScript. Parent is
4
+ Sorting algorithms for JavaScript. Parent is
5
5
[ aureooms/js-algo] ( https://github.com/aureooms/js-algo ) .
6
6
7
7
``` js
@@ -10,145 +10,31 @@ let fordjohnson = sort._fordjohnson( search.binarysearch ) ;
10
10
11
11
[ ![ NPM license] ( http://img.shields.io/npm/l/aureooms-js-sort.svg?style=flat )] ( https://raw.githubusercontent.com/aureooms/js-sort/master/LICENSE )
12
12
[ ![ NPM version] ( http://img.shields.io/npm/v/aureooms-js-sort.svg?style=flat )] ( https://www.npmjs.org/package/aureooms-js-sort )
13
- [ ![ Bower version] ( http://img.shields.io/bower/v/aureooms-js-sort.svg?style=flat )] ( http://bower.io/search/?q=aureooms-js-sort )
14
13
[ ![ Build Status] ( http://img.shields.io/travis/aureooms/js-sort.svg?style=flat )] ( https://travis-ci.org/aureooms/js-sort )
15
14
[ ![ Coverage Status] ( http://img.shields.io/coveralls/aureooms/js-sort.svg?style=flat )] ( https://coveralls.io/r/aureooms/js-sort )
16
15
[ ![ Dependencies Status] ( http://img.shields.io/david/aureooms/js-sort.svg?style=flat )] ( https://david-dm.org/aureooms/js-sort#info=dependencies )
17
16
[ ![ devDependencies Status] ( http://img.shields.io/david/dev/aureooms/js-sort.svg?style=flat )] ( https://david-dm.org/aureooms/js-sort#info=devDependencies )
18
17
[ ![ Code Climate] ( http://img.shields.io/codeclimate/github/aureooms/js-sort.svg?style=flat )] ( https://codeclimate.com/github/aureooms/js-sort )
19
18
[ ![ NPM downloads per month] ( http://img.shields.io/npm/dm/aureooms-js-sort.svg?style=flat )] ( https://www.npmjs.org/package/aureooms-js-sort )
20
19
[ ![ GitHub issues] ( http://img.shields.io/github/issues/aureooms/js-sort.svg?style=flat )] ( https://github.com/aureooms/js-sort/issues )
21
- [ ![ Inline docs] ( http://inch-ci.org/github/aureooms/js-sort.svg?branch=master&style=shields )] ( http://inch-ci.org/github/aureooms/js-sort )
22
-
23
-
24
- Can be managed through [ jspm] ( https://github.com/jspm/jspm-cli ) ,
25
- [ duo] ( https://github.com/duojs/duo ) ,
26
- [ component] ( https://github.com/componentjs/component ) ,
27
- [ bower] ( https://github.com/bower/bower ) ,
28
- [ ender] ( https://github.com/ender-js/Ender ) ,
29
- [ jam] ( https://github.com/caolan/jam ) ,
30
- [ spm] ( https://github.com/spmjs/spm ) ,
31
- and [ npm] ( https://github.com/npm/npm ) .
32
-
33
- ## Install
34
-
35
- ### jspm
36
- ``` terminal
37
- jspm install github:aureooms/js-sort
38
- # or
39
- jspm install npm:aureooms-js-sort
40
- ```
41
- ### duo
42
- No install step needed for duo!
43
-
44
- ### component
45
- ``` terminal
46
- component install aureooms/js-sort
47
- ```
48
-
49
- ### bower
50
- ``` terminal
51
- bower install aureooms-js-sort
52
- ```
53
-
54
- ### ender
55
- ``` terminal
56
- ender add aureooms-js-sort
57
- ```
58
-
59
- ### jam
60
- ``` terminal
61
- jam install aureooms-js-sort
62
- ```
63
-
64
- ### spm
65
- ``` terminal
66
- spm install aureooms-js-sort --save
67
- ```
68
-
69
- ### npm
70
- ``` terminal
71
- npm install aureooms-js-sort --save
72
- ```
73
-
74
- ## Require
75
- ### jspm
76
- ``` js
77
- let sort = require ( " github:aureooms/js-sort" ) ;
78
- // or
79
- import sort from ' aureooms-js-sort' ;
80
- ```
81
- ### duo
82
- ``` js
83
- let sort = require ( " aureooms/js-sort" ) ;
84
- ```
85
-
86
- ### component, ender, spm, npm
87
- ``` js
88
- let sort = require ( " aureooms-js-sort" ) ;
89
- ```
90
-
91
- ### bower
92
- The script tag exposes the global variable ` sort ` .
93
- ``` html
94
- <script src =" bower_components/aureooms-js-sort/js/dist/sort.min.js" ></script >
95
- ```
96
- Alternatively, you can use any tool mentioned [ here] ( http://bower.io/docs/tools/ ) .
97
-
98
- ### jam
99
- ``` js
100
- require ( [ " aureooms-js-sort" ] , function ( sort ) { ... } ) ;
101
- ```
20
+ [ ![ Documentation] ( https://aureooms.github.io/js-sort/badge.svg )] ( https://aureooms.github.io/js-sort/source.html )
102
21
103
22
## Children
104
23
105
24
This package has several children:
106
25
107
- - [ aureooms/js-bucketsort] ( https://github.com/aureooms/js-bucketsort ) : bucketsort code bricks for JavaScript
108
- - [ aureooms/js-countingsort] ( https://github.com/aureooms/js-countingsort ) : countingsort code bricks for JavaScript
109
- - [ aureooms/js-in-situ-sort-spec] ( https://github.com/aureooms/js-in-situ-sort-spec ) : in place sorting code bricks for JavaScript
110
- - [ aureooms/js-heapsort] ( https://github.com/aureooms/js-heapsort ) : heapsort code bricks for JavaScript
111
- - [ aureooms/js-quicksort] ( https://github.com/aureooms/js-quicksort ) : quicksort code bricks for JavaScript
112
- - [ aureooms/js-mergesort] ( https://github.com/aureooms/js-mergesort ) : mergesort code bricks for JavaScript
113
- - [ aureooms/js-merging] ( https://github.com/aureooms/js-merging ) : merging code bricks for JavaScript
114
- - [ aureooms/js-partition] ( https://github.com/aureooms/js-partition ) : partition code bricks for JavaScript
115
- - [ aureooms/js-radixsort] ( https://github.com/aureooms/js-radixsort ) : radixsort code bricks for JavaScript
116
- - [ aureooms/js-selection] ( https://github.com/aureooms/js-selection ) : selection code bricks for JavaScript
117
- - [ aureooms/js-odd-even-mergesort] ( https://github.com/aureooms/js-odd-even-mergesort ) : Batcher's odd-even mergesort code bricks for JavaScript
118
-
119
-
120
- ## Use
121
-
122
- ``` js
123
- let array = require ( " aureooms-js-array" ) ;
124
- let search = require ( " aureooms-js-search" ) ;
125
- let compare = require ( " aureooms-js-compare" ) ;
126
-
127
- let fordjohnson = function ( compare , a , i , j ) {
128
-
129
- sort ._fordjohnson ( search .binarysearch )( compare , array .swap , a , i , j ) ;
130
-
131
- } ;
132
-
133
- let a = [ 1 , 6 , 5 , 3 , 2 , 4 ] ;
134
-
135
- fordjohnson ( compare .increasing , a , 0 , a .length ) ;
26
+ - [ aureooms/js-bucketsort] ( https://github.com/aureooms/js-bucketsort ) : bucketsort for JavaScript
27
+ - [ aureooms/js-countingsort] ( https://github.com/aureooms/js-countingsort ) : countingsort for JavaScript
28
+ - [ aureooms/js-in-situ-sort-spec] ( https://github.com/aureooms/js-in-situ-sort-spec ) : in place sorting for JavaScript
29
+ - [ aureooms/js-heapsort] ( https://github.com/aureooms/js-heapsort ) : heapsort for JavaScript
30
+ - [ aureooms/js-quicksort] ( https://github.com/aureooms/js-quicksort ) : quicksort for JavaScript
31
+ - [ aureooms/js-mergesort] ( https://github.com/aureooms/js-mergesort ) : mergesort for JavaScript
32
+ - [ aureooms/js-merging] ( https://github.com/aureooms/js-merging ) : merging for JavaScript
33
+ - [ aureooms/js-partition] ( https://github.com/aureooms/js-partition ) : partition for JavaScript
34
+ - [ aureooms/js-radixsort] ( https://github.com/aureooms/js-radixsort ) : radixsort for JavaScript
35
+ - [ aureooms/js-selection] ( https://github.com/aureooms/js-selection ) : selection for JavaScript
36
+ - [ aureooms/js-odd-even-mergesort] ( https://github.com/aureooms/js-odd-even-mergesort ) : Batcher's odd-even mergesort for JavaScript
136
37
137
- a ; // [ 1 , 2 , 3 , 4 , 5 , 6 ]
138
-
139
- fordjohnson ( compare .decreasing , a , 0 , a .length ) ;
140
-
141
- a ; // [ 6 , 5 , 4 , 3 , 2 , 1 ]
142
-
143
- // but also
144
-
145
- /** insertionsort */
146
- let insertionsort = sort .insertionsort ;
147
- /** selectionsort */
148
- let selectionsort = sort .selectionsort ;
149
- /** bubblesort */
150
- let bubblesort = sort .bubblesort ;
151
- ```
152
38
153
39
## Reference
154
40
0 commit comments