Skip to content

Commit b3b1a6d

Browse files
📚 docs: Improve wording and formatting.
1 parent 4cf91d6 commit b3b1a6d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Skip list data structure for JavaScript.
55
See [docs](https://data-structures-and-algorithms.github.io/skip-list/index.html).
66

7-
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
7+
> :warning: Depending on your environment, the code may require
8+
> `regeneratorRuntime` to be defined, for instance by importing
89
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
910
1011
```js

doc/manual/usage.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Usage
22

3-
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
3+
> :warning: Depending on your environment, the code may require
4+
> `regeneratorRuntime` to be defined, for instance by importing
45
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
56
67
First, require the polyfill at the entry point of your application
78
```js
8-
await import( 'regenerator-runtime/runtime.js' );
9+
await import('regenerator-runtime/runtime.js');
910
// or
10-
import 'regenerator-runtime/runtime.js' ;
11+
import 'regenerator-runtime/runtime.js';
1112
```
1213

1314
Then, import the library where needed
1415
```js
15-
const skiplist = await import( '@data-structure/skip-list' ) ;
16+
const {SkipList} = await import('@data-structure/skip-list');
1617
// or
17-
import * as skiplist from '@data-structure/skip-list' ;
18+
import {SkipList} from '@data-structure/skip-list' ;
1819
```

doc/scripts/header.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ const domReady = function (callback) {
77
}
88
};
99

10-
domReady(function () {
10+
domReady(() => {
1111
const projectname = document.createElement('a');
1212
projectname.classList.add('project-name');
13-
projectname.text = 'data-structure/skip-list';
13+
projectname.text = '@data-structure/skip-list';
1414
projectname.href = './index.html';
1515

1616
const header = document.querySelector('header');
@@ -25,7 +25,7 @@ domReady(function () {
2525
const input = document.querySelector('.search-input');
2626

2727
// Active search box when focus on searchBox.
28-
input.addEventListener('focus', function () {
28+
input.addEventListener('focus', () => {
2929
searchBox.classList.add('active');
3030
});
3131
});

0 commit comments

Comments
 (0)