node_modules/router/index.js
/**
 * Restore obj props after function
 *
 * @private
 */
Restore obj props after function
@private
Restore obj props after function @private
function restore(fn, obj) {
  var props = new Array(arguments.length - 2)
  var vals = new Array(arguments.length - 2)
  for (var i = 0; i < props.length; i++) {
    props[i] = arguments[i + 2]
    vals[i] = obj[props[i]]
  }
  return function(){
    for (var i = 0; i < props.length; i++) {
      obj[props[i]] = vals[i]
    }
    return fn.apply(this, arguments)
  }
}
function restore ( fn , obj ) { var props = new Array ( arguments . length - 2 ) var vals = new Array ( arguments . length - 2 ) for ( var i = 0 ; i < props . length ; i ++ ) { props [ i ] = arguments [ i + 2 ] vals [ i ] = obj [ props [ i ] ] } return function ( ) { for ( var i = 0 ; i < props . length ; i ++ ) { obj [ props [ i ] ] = vals [ i ] } return fn . apply ( this , arguments ) } }
Restore obj props after function
 @private
Restore obj props after function @private
// restore vals