You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it matters, the underlying issue is in Buffer.prototype.write() (which is called by the constructor in this case) and not specific to the constructor.
Additionally, it seems to me that TypeError is the wrong error to throw here. A TypeError might be if something that was not a string was supplied. But an incorrectly formatted string is not a TypeError, or at least it seems to me.
Activity
buffer: throw if string is not a valid HEX string
Trott commentedon Jun 6, 2016
If it matters, the underlying issue is in
Buffer.prototype.write()(which is called by the constructor in this case) and not specific to the constructor.Trott commentedon Mar 23, 2017
Additionally, it seems to me that
TypeErroris the wrong error to throw here. ATypeErrormight be if something that was not a string was supplied. But an incorrectly formatted string is not aTypeError, or at least it seems to me.