Skip to content

Commit 76afc6c

Browse files
📚 docs(manual): Update.
1 parent 30d8286 commit 76afc6c

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

doc/manual/example.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# Example
1+
# Examples
2+
3+
> More examples in [the test files](https://github.com/codec-bytes/base32/tree/main/test/src).

doc/manual/installation.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# Installation
22

33
Can be managed using
4-
[jspm](http://jspm.io)
5-
or [npm](https://github.com/npm/npm).
4+
[yarn](https://yarnpkg.com/en/docs),
5+
[npm](https://docs.npmjs.com),
6+
or [jspm](https://jspm.org/docs).
67

7-
### jspm
8+
9+
### yarn
810
```terminal
9-
jspm install npm:@codec-bytes/base32
11+
yarn add @codec-bytes/base32
1012
```
1113

1214
### npm
1315
```terminal
1416
npm install @codec-bytes/base32 --save
1517
```
18+
19+
### jspm
20+
```terminal
21+
jspm install npm:@codec-bytes/base32
22+
```

doc/manual/usage.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Usage
22

3-
The code needs a ES2015+ polyfill to work, for example
4-
[regenerator-runtime/runtime](https://babeljs.io/docs/usage/polyfill).
3+
> :warning: Depending on your environment, the code may require
4+
> `regeneratorRuntime` to be defined, for instance by importing
5+
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
6+
7+
First, require the polyfill at the entry point of your application
58
```js
6-
await import( 'regenerator-runtime/runtime.js' ) ;
9+
await import('regenerator-runtime/runtime.js');
710
// or
8-
import 'regenerator-runtime/runtime.js' ;
11+
import 'regenerator-runtime/runtime.js';
912
```
1013

11-
Then
14+
Then, import the library where needed
1215
```js
13-
const codecbase32 = await import( '@codec-bytes/base32' ) ;
16+
const {encode, decode} = await import('@codec-bytes/base32');
1417
// or
15-
import * as codecbase32 from '@codec-bytes/base32' ;
18+
import {encode, decode} from '@codec-bytes/base32';
1619
```

0 commit comments

Comments
 (0)