lib/publisher/string-to-buffer.js
function stringToBuffer(data) {
    return (typeof Buffer.from === 'function' && Buffer.from !== Uint8Array.from) ?
        Buffer.from(data) : new Buffer(data);
}
function stringToBuffer(data) {
    return (typeof Buffer.from === 'function' && Buffer.from !== Uint8Array.from) ?
        Buffer.from(data) : new Buffer(data);
}
function stringToBuffer ( data ) { return ( typeof Buffer . from === 'function' && Buffer . from !== Uint8Array . from ) ? Buffer . from ( data ) : new Buffer ( data ) ; }
Converts a UTF8 string into a Buffer.
@param {string} data Some string to convert to a Buffer
@returns {Buffer}
Converts a UTF8 string into a Buffer .