There was an error while loading. Please reload this page.
1 parent 3cf5d2d commit 9dcf10bCopy full SHA for 9dcf10b
src/Encoder.ts
@@ -362,6 +362,18 @@ export class Encoder<ContextType = undefined> {
362
}
363
364
365
+ private countWithoutUndefined(object: Record<string, unknown>, keys: ReadonlyArray<string>): number {
366
+ let count = 0;
367
+
368
+ for (const key of keys) {
369
+ if (object[key] !== undefined) {
370
+ count++;
371
+ }
372
373
374
+ return count;
375
376
377
private encodeMap(object: Record<string, unknown>, depth: number) {
378
const keys = Object.keys(object);
379
if (this.sortKeys) {
0 commit comments