-
Notifications
You must be signed in to change notification settings - Fork 461
Update JS examples to v1, add code sandbox #1476
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
Conversation
|
@TMoMoreau can you review this for copy / writing things? Once we do that, I'll pass it to @2color to confirm the tech |
| > cid.toString('base16').substring(1) | ||
| '01701220c3c4733ec8affd06cf9e9ff50ffc6bcd2ec85a6170004bb709669c31de94391a' // "cid as hex" | ||
| ```js | ||
| const cidV1StringBase256 = cidV1.toString(base16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may make sense to show where base16 comes from (the import) and maybe even the how cidV1 is instantiated?
2color
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you had a chance to take a look at #1467?
I am torn on whether we want to have the code examples on this concepts page or move it into a guide.
If we include it, I would consider including both a Go and JS example and use the tab functionality like in the https://docs.ipfs.tech/how-to/ipfs-updater/ page.
2color
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this corrects some old packages referenced in the docs, I'm inclined to approve this already and address any additional changes in a separate PR
Draft https://bafybeieedkoyq4lndzqv6sfnqcm67lwklrk7yltfvz6aupnzluoby7ibxi.on.fleek.co/concepts/content-addressing/#cid-conversion
What this PR does
Addresses #1449