Skip to content

can we add option to strip undefined instead of erroring #57

@Gozala

Description

@Gozala

I've been working on UCAN based RPC system that encodes request / responses into set of CBOR blocks in a CAR. Unfortunately it proved challenging to not encounter errors from CBOR codec due to some field set to undefined or due to some built-in data type like Error been referenced.

Could we add an option to make CBOR codec behave more or less like JSON.stringify does, specifically

  1. Just leave out undefined values
  2. Don't complain about Error or other built-in instances, instead just include own enumerable properties

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status

🗄️ Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions