-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
add functionality to see registered tags #53
Conversation
Please fix lint issues and add yourself to a new "contributors" section in the package.json right after "author". |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 4028 4045 +17
Branches 585 585
=========================================
+ Hits 4028 4045 +17 ☔ View full report in Codecov by Sentry. |
src/tag.ts
Outdated
public static getAllDecoders(): { | ||
[key: string]: TagDecoder; | ||
} { | ||
return Object.fromEntries(this.#tags); |
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 didn't realize you could do this with Map. Nifty. Are you sure you want to lose the type info from TagNumber?
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.
Object cannot have BigInt as key so we have to loose info while converting to an object but we can return a clone of the map or the map itself just like version 1 of this library
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 a clone of the Map might be best.
This lgtm. Thanks! I'll get a release out soon, but I need to fix another issue first. |
Added functionality to show all registered decoders and tags in the registry.
We need this functionality as part of our BC-UR registry https://github.com/ngraveio/bc-ur/tree/feature/bc-ur-v2