Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buffer: default to UTF8 in byteLength()
If an undefined encoding is passed to byteLength(), assume that it is UTF8 immediately. This yields a small speedup, as it prevents string operations on the encoding argument. PR-URL: nodejs#4010 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
- Loading branch information