Source: buf-object.js

/**
 * Produce Buffer with any input.
 * For example, it's useful to send string to browser.
 *
 * @param {undefined} nothing
 * @alias bufferify
 * @this https://github.com/touv/node-ezs#scope
 * @static
 */
function BUFObject(data, feed) {
    if (this.isLast()) {
        feed.close();
    } else {
        feed.send(Buffer.from(data));
    }
}

export default {
    BUFObject,
};