-
-
Notifications
You must be signed in to change notification settings - Fork 821
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
feat: add strict
option to isHex
.
#518
Conversation
🦋 Changeset detectedLatest commit: 22cf7ca The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +140 B (0%) Total Size: 253 kB
ℹ️ View Unchanged
|
Codecov Report
@@ Coverage Diff @@
## main #518 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 259 259
Lines 23983 23988 +5
Branches 1996 1994 -2
=======================================
+ Hits 23967 23972 +5
Misses 15 15
Partials 1 1
|
There are cases where we don't really care if values are strictly hex (ie. data utils). Regex checks have quite a large cost, so removing the regex speeds up our algorithms like ABI encoding/decoding significantly.
PR-Codex overview
This PR adds a
strict
option to theisHex
function and optimizes data utilities.Detailed summary
strict
option toisHex
functionslice
function insrc/utils/data/slice.ts
size
function insrc/utils/data/size.ts
isHex
function insrc/utils/data/isHex.test.ts
keccak256
function insrc/utils/hash/keccak256.ts
isHex
function insite/docs/utilities/isHex.md