(
input: { [k: string]: CborType },
output: Uint8Array,
offset: number,
)
| 212 | } |
| 213 | |
| 214 | function encodeObject( |
| 215 | input: { [k: string]: CborType }, |
| 216 | output: Uint8Array, |
| 217 | offset: number, |
| 218 | ): number { |
| 219 | output[offset] = 0b101_00000; |
| 220 | offset = encodeHeader(0b101_00000, Object.keys(input).length, output, offset); |
| 221 | for (const key in input) { |
| 222 | offset = encodeString(key, output, offset); |
| 223 | offset = encode(input[key], output, offset); |
| 224 | } |
| 225 | return offset; |
| 226 | } |
| 227 | |
| 228 | function encodeDate(input: Date, output: Uint8Array, offset: number): number { |
| 229 | output[offset++] = 0b110_00001; |
no test coverage detected