Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider alternative approaches to Record data, data.json(), and data.text() methods #46

Closed
frankhinek opened this issue Apr 21, 2023 · 1 comment

Comments

@frankhinek
Copy link
Contributor

frankhinek commented Apr 21, 2023

Relevant code section:

https://github.com/TBD54566975/web5-js/blob/3e81ed16ba37133b1c66e59a1374b7d161fa5538/src/dwn/models/record.js#L73-L117

@dcrousso dcrousso yesterday

it's really odd that we use self and then this. can we rework this to make it less confusing? ditto below

also, can we combine these into a single if?

@dcrousso dcrousso yesterday

this means we create a new object anytime someone calls .data. can we avoid this?

@frankhinek
Copy link
Contributor Author

Completed in #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant