This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: store codecs by their code
Instead of storing a codec by their name, use their code instead. The tests are changed from `base1` to `blake2b-8` as codecs for different bases are no longer part of multicodec, but are part of multibase now. BREAKING CHANGE: The `codec` parameter in `options.loadFormat()` is a number Instead of returnign the name of the codec as string, the codec code (a number) is now returned. So if you e.g. check within the function for a certain format, it changes from: async loadFormat (codec) { if (codec !== 'dag-cbor') … } To: async loadFormat (codec) { if (codec !== multicodec.DAG_CBOR) … }
- Loading branch information
Showing
4 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters