ipld / ipld/js-dag-cbor

can we add option to strip undefined instead of erroring

Open
#57 9 comments 0 reactions 1 assignee Claimed by @rvagg View on GitHub
Dominant language
JavaScript
Stars
36
Forks
16
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.