gulp-html-partial.js
function replaceAttributes(file, attributes) {
        return (attributes || []).reduce((html, attrObj) =>
            html.replace(options.variablePrefix + attrObj.key, attrObj.value), file && file.toString() || '');
    }
function replaceAttributes(file, attributes) {
        return (attributes || []).reduce((html, attrObj) =>
            html.replace(options.variablePrefix + attrObj.key, attrObj.value), file && file.toString() || '');
    }
function replaceAttributes ( file , attributes ) { return ( attributes || [ ] ) . reduce ( ( html , attrObj ) => html . replace ( options . variablePrefix + attrObj . key , attrObj . value ) , file && file . toString ( ) || '' ) ; }
Replaces partial content with given attributes

@param {Object|undefined} file - through2's file object
@param {Array.<Object>} attributes - tag
@returns {String}
Replaces partial content with given attributes