Finds the last index of `arg` in `obj`

@method rindex
@param  {Array} obj Array to search
@param  {Mixed} arg Primitive to find
@return {Mixed}     Index or undefined
506057
function ( obj, arg ) {
		var result = -1;

		array.each( obj, function ( i, idx ) {
			if ( i === arg ) {
				result = idx;
			}
		});

		return result;
	}
1238225
function (arg) {
  if (arg instanceof Array) {
    if (arg.length === 0) return ok.call(this);
    if (arg.length === 1) return ok.call(this, arg[0]);
    if (arg.length >= 2) {
      var head = arg[0];
      var tail = arg.slice(1);
      return ok.call(this, head, tail);
    }
  }
  if (arg instanceof Object) {
    if ("x" in arg && "y" in arg) {
      return ok.call(this, arg.x, arg.y);
    }
  }
  if (typeof arg === "number") {
    return ok.call(this);
  }
}
585767
function() {
            var arg = arguments,
                target = [],
                flag,
                ln = arg.length;

            if (ln == 1) {
                target = arg[0];
            } else {
                for (var j = 0, aryLn = arg[0].length; j < aryLn; j++) {
                    var elm = arg[0][j];
                    flag = 1;
                    for (var i = 1; i < ln; i++) {
                        if (jsonQ.index(arg[i], elm) == -1) {
                            flag = 0;
                            break;
                        }
                    }
                    if (flag == 1) {
                        target.push(elm);
                    }

                }
            }
            return target;
        }
359089
function findLast(array, exp) {
  return (isArray(array) && isDefined(exp))
    //return the member and not an array like `last`
    ? findInArray(reverse(array), $parse(exp), false)
    : array;
}
886070
function ( obj, arg ) {
		var key     = obj.textContent !== undefined ? "textContent" : "innerText",
		    payload = {},
		    set     = false;

		if ( typeof arg !== "undefined" ) {
			set          = true;
			payload[key] = arg;
		}

		return set ? element.update( obj, payload ) : obj[key];
	}
931527
function ( obj ) {
		var indexed = [];

		utility.iterate( obj, function ( v ) {
			indexed.push( v );
		});

		return indexed;
	}
956823
private static int js_lastIndexOf(String target, Object[] args) {
        String search = ScriptRuntime.toString(args, 0);
        double end = ScriptRuntime.toNumber(args, 1);

        if (end != end || end > target.length())
            end = target.length();
        else if (end < 0)
            end = 0;

        return target.lastIndexOf(search, (int)end);
    }
154133
function obj(/*key,value, key,value ...*/) {
    var result = {}
    for(var n=0; n<arguments.length; n+=2) {
        result[arguments[n]] = arguments[n+1]
    }
    return result
}
1046386
function ( obj, arg ) {
		var result = element.find( obj, arg );

		return ( !isNaN( result.length ) && result.length > 0 );
	}
1130001
function ( obj, arg ) {
		var nth = obj.length,
		    result;

		if ( arg === 0 ) {
			result = obj;
		}
		else {
			if ( arg < 0 ) {
				arg += nth;
			}
			else {
				arg--;
			}

			result = array.limit( obj, arg, nth );
			result = result.concat( array.limit( obj, 0, arg ) );
		}

		return result;
	}
1182918
function ( obj, arg ) {
		arg = arg || ",";

		return string.trim( obj ).split( new RegExp( "\\s*" + arg + "\\s*" ) );
	}
692030
function (obj /*, arguments */) {
    var stack = [obj];
    var leaf = true;
    for (var i = 1; i < arguments.length - 1; i++) {
      var key = arguments[i];
      if (!(key in obj)) {
        leaf = false;
        break;
      }
      obj = obj[key];
      if (typeof obj !== "object")
        break;
      stack.push(obj);
    }

    for (var i = stack.length - 1; i >= 0; i--) {
      var key = arguments[i+1];

      if (leaf)
        leaf = false;
      else
        for (var other in stack[i][key])
          return; // not empty -- we're done

      delete stack[i][key];
    }
  }
184331
function splitArgObjects (args) {
  const newArgs = []
  let index = 0

  while (index < args.length) {
    const arg = args[index]

    if (arg.indexOf('{') !== -1) {
      const temp = []

      while (args[index].indexOf('}') === -1) {
        temp.push(args[index])
        index++
      }
      temp.push(args[index])

      newArgs.push(temp.join(' ').replace(/([\w\d-]+):\s*([\w\d-]*)/g, '"$1": "$2"'))
    } else {
      newArgs.push(arg)
    }

    index++
  }

  return newArgs
}
739788
function resolveObject(arg) {
  var resolvedObject = {};
  return Object.keys(arg)
      .reduce(function(soFar, key) {
        return soFar
            .then(resolveItem.bind(null, arg[key]))
            .then(function(value) {
              resolvedObject[key] = value;
            });
      }, Promise.resolve())
      .then(function() {
        return resolvedObject;
      });
}
1153969
function (func, thisArg, argCount) {
        var type = typeof func;
        if (type !== 'function') {
            if (type !== 'object') {
                return function (object) {
                    return object[func];
                };
            }
            var props = keys(func);
            return function (object) {
                var length = props.length,
                    result = false;
                while (length--) {
                    if (!(result = isEqual(object[props[length]], func[props[length]], sofa.Util.indicatorObject))) {
                        break;
                    }
                }
                return result;
            };
        }
        if (typeof thisArg == 'undefined') {
            return func;
        }
        if (argCount === 1) {
            return function (value) {
                return func.call(thisArg, value);
            };
        }
        if (argCount === 2) {
            return function (a, b) {
                return func.call(thisArg, a, b);
            };
        }
        if (argCount === 4) {
            return function (accumulator, value, index, collection) {
                return func.call(thisArg, accumulator, value, index, collection);
            };
        }
        return function (value, index, collection) {
            return func.call(thisArg, value, index, collection);
        };
    }
643330
function getLastResult() {
    if (argv._.length >= 2) {
        try {
            return JSON.parse(argv._[1]);
        } catch (err) {
            // pass
        }
    }

    return null;
}
805069
function(type, args, obj) {
        var selected = args[0],
            cfgSelected = DEF_CFG.SELECTED.key;
        
        if (selected) {
            if (Lang.isString(selected)) {
                this.cfg.setProperty(cfgSelected, this._parseDates(selected), true);
            } 
        }
        if (! this._selectedDates) {
            this._selectedDates = this.cfg.getProperty(cfgSelected);
        }
    }