Skip to content

Commit 871a07d

Browse files
committed
doc: section/import example order for encoding.js
1 parent ff73fe5 commit 871a07d

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,13 @@ Important: does not copy data, returns a view on the same underlying buffer
525525

526526
### `@exodus/bytes/encoding.js`
527527

528+
Implements the [Encoding standard](https://encoding.spec.whatwg.org/):
529+
[TextDecoder](https://encoding.spec.whatwg.org/#interface-textdecoder),
530+
[TextEncoder](https://encoding.spec.whatwg.org/#interface-textencoder),
531+
[TextDecoderStream](https://encoding.spec.whatwg.org/#interface-textdecoderstream),
532+
[TextEncoderStream](https://encoding.spec.whatwg.org/#interface-textencoderstream),
533+
some [hooks](https://encoding.spec.whatwg.org/#specification-hooks).
534+
528535
```js
529536
import { TextDecoder, TextEncoder } from '@exodus/bytes/encoding.js'
530537
import { TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding.js' // Requires Streams
@@ -533,13 +540,6 @@ import { TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding.js'
533540
import { getBOMEncoding, legacyHookDecode, labelToName, normalizeEncoding } from '@exodus/bytes/encoding.js'
534541
```
535542

536-
Implements the [Encoding standard](https://encoding.spec.whatwg.org/):
537-
[TextDecoder](https://encoding.spec.whatwg.org/#interface-textdecoder),
538-
[TextEncoder](https://encoding.spec.whatwg.org/#interface-textencoder),
539-
[TextDecoderStream](https://encoding.spec.whatwg.org/#interface-textdecoderstream),
540-
[TextEncoderStream](https://encoding.spec.whatwg.org/#interface-textencoderstream),
541-
some [hooks](https://encoding.spec.whatwg.org/#specification-hooks).
542-
543543
#### `new TextDecoder(label = 'utf-8', { fatal = false, ignoreBOM = false })`
544544

545545
[TextDecoder](https://encoding.spec.whatwg.org/#interface-textdecoder) implementation/polyfill.

encoding.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
/**
2+
* Implements the [Encoding standard](https://encoding.spec.whatwg.org/):
3+
* [TextDecoder](https://encoding.spec.whatwg.org/#interface-textdecoder),
4+
* [TextEncoder](https://encoding.spec.whatwg.org/#interface-textencoder),
5+
* [TextDecoderStream](https://encoding.spec.whatwg.org/#interface-textdecoderstream),
6+
* [TextEncoderStream](https://encoding.spec.whatwg.org/#interface-textencoderstream),
7+
* some [hooks](https://encoding.spec.whatwg.org/#specification-hooks).
8+
*
29
* ```js
310
* import { TextDecoder, TextEncoder } from '@exodus/bytes/encoding.js'
411
* import { TextDecoderStream, TextEncoderStream } from '@exodus/bytes/encoding.js' // Requires Streams
@@ -7,13 +14,6 @@
714
* import { getBOMEncoding, legacyHookDecode, labelToName, normalizeEncoding } from '@exodus/bytes/encoding.js'
815
* ```
916
*
10-
* Implements the [Encoding standard](https://encoding.spec.whatwg.org/):
11-
* [TextDecoder](https://encoding.spec.whatwg.org/#interface-textdecoder),
12-
* [TextEncoder](https://encoding.spec.whatwg.org/#interface-textencoder),
13-
* [TextDecoderStream](https://encoding.spec.whatwg.org/#interface-textdecoderstream),
14-
* [TextEncoderStream](https://encoding.spec.whatwg.org/#interface-textencoderstream),
15-
* some [hooks](https://encoding.spec.whatwg.org/#specification-hooks).
16-
*
1717
* @module @exodus/bytes/encoding.js
1818
*/
1919

0 commit comments

Comments
 (0)