packages/browser-sync/lib/server/proxy-server.js
function applyFns(name, fns) {
        if (!List.isList(fns)) fns = [fns];
        proxy.on(name, function() {
            var args = arguments;
            fns.forEach(function(fn) {
                if (typeof fn === "function") {
                    fn.apply(null, args);
                }
            });
        });
    }
function applyFns(name, fns) {
        if (!List.isList(fns)) fns = [fns];
        proxy.on(name, function() {
            var args = arguments;
            fns.forEach(function(fn) {
                if (typeof fn === "function") {
                    fn.apply(null, args);
                }
            });
        });
    }
function applyFns ( name , fns ) { if ( ! List . isList ( fns ) ) fns = [ fns ] ; proxy . on ( name , function ( ) { var args = arguments ; fns . forEach ( function ( fn ) { if ( typeof fn === "function" ) { fn . apply ( null , args ) ; } } ) ; } ) ; }
Apply functions to proxy events
@param {string} name - the name of the http-proxy event
@param {Array} fns - functions to call on each event
Apply functions to proxy events