src/string.util.js
function toArrayBuffer(str) {
    /* eslint no-bitwise: "off" */
    const len = isString(str) ? str.length : 0,
        buf = new ArrayBuffer(len),
        view = new Uint8Array(buf);

    Array(len).fill().forEach((val, i) => (view[i] = str.charCodeAt(i) & 0xFF));

    return view;
}
function toArrayBuffer(str) {
    /* eslint no-bitwise: "off" */
    const len = isString(str) ? str.length : 0,
        buf = new ArrayBuffer(len),
        view = new Uint8Array(buf);

    Array(len).fill().forEach((val, i) => (view[i] = str.charCodeAt(i) & 0xFF));

    return view;
}
Converts a string value to an `ArrayBuffer`
@method utilitarian.string.util#toArrayBuffer
@param {string} str A string value to convert to `ArrayBuffer`
@returns {Uint8Array} An `ArrayBuffer` representation of the original string