-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.ts
44 lines (44 loc) · 848 Bytes
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* This façade module exports the public API of this package.
*
* @example Encoding a Bencodex dictionary and decoding it back
*
* ```typescript
* const encoded = encode(new Map([["foo", 123n]]));
* const decoded = decode(encoded);
* ```
*
* @module
*/
export {
decode,
decodeValue,
DecodingError,
type DecodingErrorKind,
type DecodingOptions,
type DecodingState,
} from "./src/decoder.ts";
export {
encode,
encodeInto,
type EncodingOptions,
estimateSize,
type NonAllocEncodingOptions,
type SizeEstimationOptions,
} from "./src/encoder.ts";
export {
areDictionariesEqual,
areKeysEqual,
areValuesEqual,
type Dictionary,
isDictionary,
isKey,
type Key,
type Value,
} from "./src/types.ts";
export {
BencodexDictionary,
isRecordValue,
type RecordValue,
RecordView,
} from "./src/dict.ts";