function accumulateContent(res, content) {
        if (content) {
            if (typeof content == "string") {
                res._apicache.content = (res._apicache.content || "") + content;
            } else if (Buffer.isBuffer(content)) {
                let oldContent = res._apicache.content;

                if (typeof oldContent === "string") {
                    oldContent = !Buffer.from ? new Buffer(oldContent) : Buffer.from(oldContent);
                }

                if (!oldContent) {
                    oldContent = !Buffer.alloc ? new Buffer(0) : Buffer.alloc(0);
                }

                res._apicache.content = Buffer.concat(
                    [oldContent, content],
                    oldContent.length + content.length
                );
            } else {
                res._apicache.content = content;
            }
        }
    }
Appends content to the response.
@param {Object} res Express response object
@param {(string|Buffer)} content The content to append.

Generated by Trelent