Return the first argument that is not undefined

@api private
439937
function defined () {
  for (var i=0; i<arguments.length; i++)
    if (typeof arguments[i] !== 'undefined') 
      return arguments[i]
}
1116295
function getFirstItemAppend(path, obj, target, propName){
  var propValue = utils.getNodeVaue(path, obj);
  if(propValue)
    target[propName][0] = propValue;
}
1068931
function getArguments( fn ) {
	return _.isFunction( fn ) ? trim( /[(]([^)]*)[)]/.exec( fn.toString() )[ 1 ].split( ',' ) ) : [];
}
455170
def get_arg_or_attr(self, name, default=None):
        """"""
        if name in self.flow_args:
            return self.flow_args[name]
        try:
            return getattr(self, name)
        except AttributeError:
            return default
1293246
function ( obj, arg ) {
		arg = arg || 1;

		if ( arg < 1 ) {
			arg = 1;
		}

		return array.limit( obj, arg, obj.length );
	}
223739
function pick() {
	var args = arguments,
		i,
		arg,
		length = args.length;
	for (i = 0; i < length; i++) {
		arg = args[i];
		if (typeof arg !== 'undefined' && arg !== null) {
			return arg;
		}
	}
}
812297
function(args) {
  var argsMap = {};
  var mainPos = 1;

  while (args[mainPos].indexOf('--') > 0) {
    mainPos++;
  }
  argsMap.main = args[mainPos];

  for (var i = (mainPos + 1); i < args.length; i++) {
    var arg = args[i];
    var sep = arg.indexOf('=');
    var key = arg.slice(0, sep);
    var value = arg.slice(sep + 1);
    if (!isNaN(Number(value)) && (value.indexOf('.') < 0)) {
      value = Number(value);
    }
    argsMap[key] = value;
  }

  return argsMap;
}
1106509
function first(arr, fn) {
  const l = arr.length;
  for (let i = 0; i < l; i += 1) {
    const res = fn(arr[i], i);
    if (res) {
      return res;
    }
  }

  return null;
}
883645
function getArgs(userArgs, defaultArgs, userCallback) {
  let args = { };
  let callback = userCallback || function() { };
  defaultArgs.unshift(args);
  _.assign.apply(null, defaultArgs);

  if (_.isPlainObject(userArgs)) {
    _.merge(args, userArgs);
  } else {
    callback = userArgs;
  }

  return {
    options: args,
    callback,
  };
}
682152
function getFunctionArgs(args) {
        if (args.length > 2) {
            var fnArgs = new Array(args.length - 2),
                i;
            for (i = 2; i < args.length; ++i) {
                fnArgs[i - 2] = args[i];
            }
            return fnArgs;
        }
        return [];
    }
950812
function getEventAndAnchor (arg1, arg2) {
  var ev = null
  var anchor = null

  if (arguments.length === 2) {
    // Two arguments will come in this order
    ev = arg1
    anchor = arg2
  } else if (isHTMLElement(arg1)) {
    // If our first arg is an element
    // then use that as our anchor
    anchor = arg1
  } else {
    // Otherwise our argument is an event
    ev = arg1
  }

    // If there is no anchor, but we have an event
    // then use event.target
  if (!anchor && ev && ev.target) {
    anchor = ev.target
  }

    // Return an array so that it can be used with Function.apply
  return [ev, anchor]
}
864376
function(first_argument, second_argument) {
		this.data = null;
		this.Ndata = null;
		this.ifLoad = false;
		this._stack = [];
		this.history = [];
		
		var that = this;
		
		if(typeof first_argument === 'number' && first_argument % 1 == 0 && typeof second_argument === 'number' && second_argument % 1 == 0) {
			that.width = parseInt(first_argument);
			that.height = parseInt(second_argument);
			that.bpp = 4;
			
			that.ifLoad = true;
		}
		else {
			that.fs.stat(first_argument, function(err, stats) {
				if (err) throw err;
				
				/**
				 * read
				 */
				that.fs.readFile(first_argument, function(err, data) {
					if (err) throw err;
					
					/**
					 * 
					 */
					that.data = data;
					that.ifLoad = true;
					that.stack(first_argument);
				});
			});			
		}
	}
231869
function() {
      var args = Array.prototype.slice.call(arguments),
          text = args.shift();
      return text.replace(/\{(\d+)\}/g, function(match, number) {
        return typeof args[number] !== 'undefined' ? args[number] : match;
      });
    }
351619
function ( arg ) {
		if ( arg !== undefined ) {
			document.location.hash = arg;
		}

		return document.location.hash;
	}
324654
function(name, otherArgs) {
			if (name === 'option' && (otherArgs.length === 0 ||
					(otherArgs.length === 1 && typeof otherArgs[0] === 'string'))) {
				return true;
			}
			return $.inArray(name, this._getters) > -1;
		}
199224
function () {
  let args = sliced(arguments)
  let done = args[args.length - 1]
  if (args.length < 2) {
    // not enought params
    return done()
  }

  let selector = args[0]
  if (typeof selector === 'string') {
    let callback = args[1]
    let timeout = null

    if (typeof callback === 'string') {
      let shouldBe = null

      if (typeof args[2] !== 'function') {
        shouldBe = args[2]
      }

      if (typeof args[3] === 'number') {
        timeout = args[3]
      }

      callback = (element) => _get(element, args[1]) === shouldBe
    } else if (typeof args[1] === 'number') {
      timeout = args[1]
    }

    if (args.length < 3) {
      callback = null
    }

    waitelem.apply({ timeout, callback }, [this, selector, done])
  } else {
    done()
  }
}
311745
function getArgs(){

    var params, args = [], wasFlag, posIndex;
    if(!hasWindow && hasProcess){
        params = process.argv.slice(2);

        if(!params.length) return [];

        if((posIndex = params.indexOf('--')) !== -1){
            return params.slice(posIndex + 1);
        }

        for(var i=0; i<params.length; i++){

            if(isFlag(params[i])){
                wasFlag = params[i];
                if(hasEqual(params[i])){
                    if(i+1 < params.length - 1 && !isFlag(params[i+1])){
                        i++;
                        args.push(toJSValue(params[i]));
                        wasFlag = false;
                    }
                }
            }else{

                if(!wasFlag){
                    args.push(toJSValue(params[i]));
                }
                wasFlag = false;
            }
        }

        return args;
    }else if(hasWindow){
        return window.location.pathname.split('/');
    }

    return [];
}