You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
Currently constants.names and constants.codes are exported as Arrays, which means looking-up if a particular name or code exists requires scanning the whole array.
Please export those name and codes as objects directly so that callers can lookup directly, and also get the name from the code, and vice-versa (since the object structure has rich info on relations between them, which is lost when Object.keys is performed).
- adds support for all the encodings in https://github.com/multiformats/multibase/blob/master/multibase.csv
- better errors showing the invalid chars and inputs
- `names` and `codes` exports the full object that maps names/codes to base instances
- you can use these to get the unprefixed base encoder/decoder
- two new methods exported, `encoding` and `encodingFromData`
- you can use these to get the unprefixed base encoder/decoder
- adds all the spec tests https://github.com/multiformats/multibase/tree/master/tests
- its also faster check benchmarks below
This module now only uses 2 base encoding implementations, 1 generalised rfc4648 and 1 generalised btc like.
closes#49closes#38closes#46closes#53closes#26
BREAKING CHANGE: `names` and `codes` export the full object that maps names/codes to base instances instead of just the keys
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently
constants.names
andconstants.codes
are exported as Arrays, which means looking-up if a particular name or code exists requires scanning the whole array.js-multibase/src/index.js
Lines 13 to 15 in 9e80d3b
Please export those
name
andcodes
as objects directly so that callers can lookup directly, and also get the name from the code, and vice-versa (since the object structure has rich info on relations between them, which is lost whenObject.keys
is performed).Something like below:
The text was updated successfully, but these errors were encountered: