Skip to content

Commit eb29e4f

Browse files
📚 docs: Improve.
1 parent ca9ad93 commit eb29e4f

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[js-heapsort](https://comparison-sorting.github.io/heap-sort)
1+
:octopus:
2+
[@comparison-sorting/heap-sort](https://comparison-sorting.github.io/heap-sort)
23
==
34

45
Heapsort algorithms for JavaScript. Parents are
@@ -7,7 +8,8 @@ and
78
[@heap-data-structure](https://github.com/heap-data-structure/about).
89

910
```js
10-
let sort = heapsort.dary( 2 ) ;
11+
import {dary} from '@comparison-sorting/heap-sort';
12+
let sort = dary(2);
1113
```
1214

1315
[![License](https://img.shields.io/github/license/comparison-sorting/heap-sort.svg)](https://raw.githubusercontent.com/comparison-sorting/heap-sort/main/LICENSE)
@@ -24,6 +26,6 @@ let sort = heapsort.dary( 2 ) ;
2426
[![Documentation](https://comparison-sorting.github.io/heap-sort/badge.svg)](https://comparison-sorting.github.io/heap-sort/source.html)
2527
[![Package size](https://img.shields.io/bundlephobia/minzip/@comparison-sorting/heap-sort)](https://bundlephobia.com/result?p=@comparison-sorting/heap-sort)
2628

27-
## Reference
29+
## :scroll: Reference
2830

29-
- http://sorting.at
31+
- https://sorting.at

doc/manual/example.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Examples
2+
23
```js
3-
let compare = require( "@total-order/primitive" ) ;
4+
import * as compare from '@total-order/primitive';
5+
import * as heapSort from '@comparison-sorting/heap-sort';
46

5-
/** binary heapsort */
6-
let sort = heapsort.dary( 2 ) ;
7+
/** binary heap-sort */
8+
let sort = heapSort.dary( 2 ) ;
79

810
let a = [ 1 , 6 , 5 , 3 , 2 , 4 ] ;
911

@@ -17,10 +19,10 @@ a ; // [ 6 , 5 , 4 , 3 , 2 , 1 ]
1719

1820
// but also
1921

20-
/** ternary heapsort */
21-
let sort = heapsort.dary( 3 ) ;
22-
/** quaternary heapsort */
23-
let sort = heapsort.dary( 4 ) ;
22+
/** ternary heap-sort */
23+
let sort = heapSort.dary( 3 ) ;
24+
/** quaternary heap-sort */
25+
let sort = heapSort.dary( 4 ) ;
2426
/** etc... */
25-
let sort = heapsort.dary( 5 ) ;
27+
let sort = heapSort.dary( 5 ) ;
2628
```

doc/manual/usage.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
# Usage
2-
The code needs a ES2015+ polyfill to work, for example
3-
[regenerator-runtime/runtime](https://babeljs.io/docs/usage/polyfill).
4-
```js
5-
await import( 'regenerator-runtime/runtime.js' ) ;
6-
// or
7-
import 'regenerator-runtime/runtime.js' ;
8-
```
92

10-
Then
3+
Import where needed:
114
```js
12-
const measure = await import( '@comparison-sorting/heap-sort' ) ;
5+
const heapSort = await import('@comparison-sorting/heap-sort');
136
// or
14-
import measure from '@comparison-sorting/heap-sort' ;
7+
import * as heapSort from '@comparison-sorting/heap-sort';
158
```

0 commit comments

Comments
 (0)