UNPKG

@n3okill/utils

Version:
15 lines 397 B
/* global BufferEncoding */ import { detectEncoding } from "./detectEncoding"; /** * Transforms argument into string * @param arg the buffer to transform * @param encoding the encoding to be used * @returns */ export function toString(arg, encoding) { if (!encoding) { encoding = detectEncoding(arg); } return arg.toString(encoding); } //# sourceMappingURL=toString.js.map