Parser Improvements
Opened this issue · 0 comments
brian6932 commented
First mention #15 (comment)
- Remove the branch in
decodeValue()
, as we do it inparseTags()
now. Or just removedecodeValue()
altogether, it's not really needed, we can do all the logic inparseTags()
(tests will have to be updated, either way). - Use the
this
binding ofparseTags()
as a constructor function, then instance withnew
, no need to create an extra object, as it's already athis
bounded function. - Use the buffer directly, then
toString()
tags and their properties. - Move to a traditional for loop, slice indices instead of using
split()
(the above checkbox would make this cleaner as it comes with akeys()
iterator method).