There are two commits in here; a fix and an update for the dependencies. Happy to separate them into separate PRs if you'd like.
Default maxLength
Currently the maxLength is only being specified if the param is not given to readFixedMessage or readVarintMessage. The problem with that is that both functions are private and they are always called with maxLength, even if it's undefined. I set the default maxLength on the opts prior to those functions being called so it always exists. I also removed the, maxLength is the callback, check inside those methods, as it's not needed since they are private and we always supply the maxLength.
String literals were being passed as errors, which also breaks linting, so I turned those into actual errors and updated the tests.
Dependency Updates
The major update here is to the latest version of Aegir, which required npm script updates.
It also includes the latest pull-reader (1.3.0), which adds the support needed for #8.
There are two commits in here; a fix and an update for the dependencies. Happy to separate them into separate PRs if you'd like.
Default maxLength
Currently the maxLength is only being specified if the param is not given to
readFixedMessage
orreadVarintMessage
. The problem with that is that both functions are private and they are always called with maxLength, even if it's undefined. I set the default maxLength on the opts prior to those functions being called so it always exists. I also removed the, maxLength is the callback, check inside those methods, as it's not needed since they are private and we always supply the maxLength.String literals were being passed as errors, which also breaks linting, so I turned those into actual errors and updated the tests.
Dependency Updates
The major update here is to the latest version of Aegir, which required npm script updates. It also includes the latest pull-reader (1.3.0), which adds the support needed for #8.