-
-
Notifications
You must be signed in to change notification settings - Fork 77
Refactoting of decoder for better maintainability #76
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
Merged
Merged
Changes from 35 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
a0f5f62
Feature: Manually encode unsuppoted object.
thephoenixofthevoid 12f63ee
Refactoring: inlining hasMinBufferSize and simplifying decode(buf)
thephoenixofthevoid 991cc76
Used while where it actually meant to.
thephoenixofthevoid 287d374
In decodeMap(...) simplify counting amount of bytes consumed
thephoenixofthevoid f7345f0
Imporove maintainability
thephoenixofthevoid 8a932aa
Getting rid of "offset + 1" artificial expression
thephoenixofthevoid a9ec4fb
Keep on getting intent more clear
thephoenixofthevoid 11ef5e6
Implemented all integers and all kinds of floats
thephoenixofthevoid 65ce0ba
Added missing Ranges as TODO commends
thephoenixofthevoid c5789c7
function decodeStr (buf, offset, size)
thephoenixofthevoid a511bdd
Added decodeBuffers
thephoenixofthevoid db3f3e8
gitignore updated
thephoenixofthevoid 3ae90f9
if (inRange(0xc7, 0xc9)) return decodeExts(buf, offset, size - 2)
thephoenixofthevoid a902377
decodeFixExt + Moved functions outside of closure
thephoenixofthevoid e3546c8
It was just a line!
thephoenixofthevoid 6319853
Update .gitignore
thephoenixofthevoid f2840b6
decodeArray
thephoenixofthevoid ebb90c0
small arrays and
thephoenixofthevoid 67d253c
decodeMaps + ordering
thephoenixofthevoid 83cb8ac
fixmap fixarr fixstr
thephoenixofthevoid e3be779
Inline buf.readUIntBE(offset, size) method where getLength (buf, offs…
thephoenixofthevoid f70ee03
function decodeTimestamp (buf, size, headerSize) moved to helper
thephoenixofthevoid c2c4b18
Use array syntax to handle results
thephoenixofthevoid 6f725ac
Few changes
thephoenixofthevoid 76a8958
Avoid using length var at top level
thephoenixofthevoid 8d5003a
Avoid using result var at top level
thephoenixofthevoid 672e68c
remove dist folder from git
thephoenixofthevoid 698c73e
Restore dist files
thephoenixofthevoid c2e3c1b
Restore dist min files
thephoenixofthevoid 2cbbaeb
Finally restore min version
thephoenixofthevoid 4b7f55f
Inline decodeExts helper
thephoenixofthevoid c53969f
Revert transform unsupported
thephoenixofthevoid c80300c
Clean up index.js
thephoenixofthevoid c02177f
Import IncompleteBufferError from helpers.js and not reexport in deco…
thephoenixofthevoid 1d96857
Remove passing transformUnsupported option from index.js
thephoenixofthevoid 45a8340
Small fixes
thephoenixofthevoid b5bd1fd
Small fixes
thephoenixofthevoid 40d2871
Fix travis builds
thephoenixofthevoid 311de36
Fix travis builds 2
thephoenixofthevoid 4a404e2
Fix travis builds 3
thephoenixofthevoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,3 +27,5 @@ node_modules | |
| spec.html spec.md | ||
|
|
||
| package-lock.json | ||
| yarn.lock | ||
| dist | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.