436a9631fc
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9 lines
197 B
JavaScript
9 lines
197 B
JavaScript
"use strict";
|
|
|
|
module.exports = function getByteLength(string) {
|
|
if (typeof string !== "string") {
|
|
throw new Error("Input must be string");
|
|
}
|
|
return Buffer.byteLength(string, "utf8");
|
|
};
|