components/utils/scripts/dust.js
function compactBuffers(context, node) {
  var out = [node[0]], memo;
  for (var i=1, len=node.length; i<len; i++) {
    var res = dust.filterNode(context, node[i]);
    if (res) {
      if (res[0] === 'buffer') {
        if (memo) {
          memo[1] += res[1];
        } else {
          memo = res;
          out.push(res);
        }
      } else {
        memo = null;
        out.push(res);
      }
    }
  }
  return out;
}
function compactBuffers(context, node) {
  var out = [node[0]], memo;
  for (var i=1, len=node.length; i<len; i++) {
    var res = dust.filterNode(context, node[i]);
    if (res) {
      if (res[0] === 'buffer') {
        if (memo) {
          memo[1] += res[1];
        } else {
          memo = res;
          out.push(res);
        }
      } else {
        memo = null;
        out.push(res);
      }
    }
  }
  return out;
}
function compactBuffers ( context , node ) { var out = [ node [ 0 ] ] , memo ; for ( var i = 1 , len = node . length ; i < len ; i ++ ) { var res = dust . filterNode ( context , node [ i ] ) ; if ( res ) { if ( res [ 0 ] === 'buffer' ) { if ( memo ) { memo [ 1 ] += res [ 1 ] ; } else { memo = res ; out . push ( res ) ; } } else { memo = null ; out . push ( res ) ; } } } return out ; }
Compacts consecutive buffer nodes into a single node
Compacts consecutive buffer nodes into a single node