Commit 8ce02cf0 authored by Trevor Norris's avatar Trevor Norris
Browse files

buffer: misc logic simplification

Includes:
* No need for `typeof` when checking undefined.
* length is coerced to uint so no need to check if < 0.
* Stay consistent and always throw `new` errors.
* Returning offset + magic number in every write is error prone. Instead
  return the central write function which returns the correct offset.
parent d74932e5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment