Skip to content

Commit 8034575

Browse files
committed
fix typos
1 parent a4935a5 commit 8034575

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ deepStrictEqual(decode(encoded), object);
5050
- [`decodeMultiStream(stream: ReadableStreamLike<ArrayLike<number> | BufferSource>, options?: DecoderOptions): AsyncIterable<unknown>`](#decodemultistreamstream-readablestreamlikearraylikenumber--buffersource-options-decoderoptions-asynciterableunknown)
5151
- [Reusing Encoder and Decoder instances](#reusing-encoder-and-decoder-instances)
5252
- [Extension Types](#extension-types)
53-
- [ExtensionCodec context](#extensioncodec-context)
54-
- [Handling BigInt with ExtensionCodec](#handling-bigint-with-extensioncodec)
55-
- [The temporal module as timestamp extensions](#the-temporal-module-as-timestamp-extensions)
53+
- [ExtensionCodec context](#extensioncodec-context)
54+
- [Handling BigInt with ExtensionCodec](#handling-bigint-with-extensioncodec)
55+
- [The temporal module as timestamp extensions](#the-temporal-module-as-timestamp-extensions)
5656
- [Decoding a Blob](#decoding-a-blob)
5757
- [MessagePack Specification](#messagepack-specification)
5858
- [MessagePack Mapping Table](#messagepack-mapping-table)
@@ -286,7 +286,7 @@ extensionCodec.register({
286286
},
287287
});
288288

289-
// Map<T>
289+
// Map<K, V>
290290
const MAP_EXT_TYPE = 1; // Any in 0-127
291291
extensionCodec.register({
292292
type: MAP_EXT_TYPE,
@@ -311,7 +311,7 @@ Ensure you include your extensionCodec in any recursive encode and decode statem
311311

312312
Note that extension types for custom objects must be `[0, 127]`, while `[-1, -128]` is reserved for MessagePack itself.
313313

314-
#### ExtensionCodec context
314+
### ExtensionCodec context
315315

316316
When you use an extension codec, it might be necessary to have encoding/decoding state to keep track of which objects got encoded/re-created. To do this, pass a `context` to the `EncoderOptions` and `DecoderOptions`:
317317

@@ -355,7 +355,7 @@ const encoded = = encode({myType: new MyType<any>()}, { extensionCodec, context
355355
const decoded = decode(encoded, { extensionCodec, context });
356356
```
357357

358-
#### Handling BigInt with ExtensionCodec
358+
### Handling BigInt with ExtensionCodec
359359

360360
This library does not handle BigInt by default, but you have two options to handle it:
361361

@@ -404,7 +404,7 @@ const encoded: = encode(value, { extensionCodec });
404404
deepStrictEqual(decode(encoded, { extensionCodec }), value);
405405
```
406406

407-
#### The temporal module as timestamp extensions
407+
### The temporal module as timestamp extensions
408408

409409
There is a proposal for a new date/time representations in JavaScript:
410410

0 commit comments

Comments
 (0)