Formant Arguments
@param args
@returns {*}
436134
function formatArguments(args) {
    if (Array.isArray(args)) {
        return args.map(function (item) {
            return formatArgument(item);
        });
    } else if (typeof args === 'string' || args instanceof String) {
        return [formatArgument(args)];
    }
    console.error(`${PLUGIN_NAME} : Arguments are not passed in a valid format: ${args}`);
    return [];
}
863740
function formatArgs(args) {
	const {namespace: name, useColors} = this;

	if (useColors) {
		const c = this.color;
		const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
		const prefix = `  ${colorCode};1m${name} \u001B[0m`;

		args[0] = prefix + args[0].split('\n').join('\n' + prefix);
		args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
	} else {
		args[0] = getDate() + name + ' ' + args[0];
	}
}
123292
function format(str, ...args) {
  return !args.length ? str : str.replace(/%[a-zA-Z]/, (match) => args.shift() || match);
}
367249
function s () {
  var args = arrayFrom(arguments)
  var msg = args.shift()
  return args.reduce(replace(/(?:%s|%d)/), '[pipeP] ' + msg)
}
942966
def format_args(self, args):
        ''''''

        def format_arg(a):
            if isinstance(a, dbus.Boolean):
                return str(bool(a))
            if isinstance(a, dbus.Byte):
                return str(int(a))
            if isinstance(a, int) or isinstance(a, long):
                return str(a)
            if isinstance(a, str):
                return '"' + str(a) + '"'
            if isinstance(a, unicode):  # Python 2 only
                return '"' + repr(a.encode('UTF-8'))[1:-1] + '"'
            if isinstance(a, list):
                return '[' + ', '.join([format_arg(x) for x in a]) + ']'
            if isinstance(a, dict):
                fmta = '{'
                first = True
                for k, v in a.items():
                    if first:
                        first = False
                    else:
                        fmta += ', '
                    fmta += format_arg(k) + ': ' + format_arg(v)
                return fmta + '}'

            # fallback
            return repr(a)

        s = ''
        for a in args:
            if s:
                s += ' '
            s += format_arg(a)
        if s:
            s = ' ' + s
        return s
1033903
public static String format(String str, Object... args) {
        str = str.replaceAll("\\{}", "%s");

        return String.format(str, args);
    }
696667
function(args) {
        args = args || [];
        var that = this;
        var html = '';
        var number = 0;
        this.callbacks = {};


        if (typeof args === 'string') {
            html = args;
            number++;
        } else {
            $.each(args, function(i, val) {

                var id = val.id = val.id || val.value;
                var style = '';
                that.callbacks[id] = val.callback;


                if (val.display === false) {
                    style = ' style="display:none"';
                } else {
                    number++;
                }

                html +=
                    '<button' +
                    ' type="button"' +
                    ' i-id="' + id + '"' +
                    style +
                    (val.disabled ? ' disabled' : '') +
                    (val.autofocus ? ' autofocus class="ui-dialog-autofocus"' : '') +
                    '>' +
                    val.value +
                    '</button>';

                that._$('button')
                    .on('click', '[i-id=' + id + ']', function(event) {
                        var $this = $(this);
                        if (!$this.attr('disabled')) { // IE BUG
                            that._trigger(id);
                        }

                        event.preventDefault();
                    });

            });
        }

        this._$('button').html(html);
        this._$('footer')[number ? 'show' : 'hide']();

        return this;
    }
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);
  }
}
1068931
function getArguments( fn ) {
	return _.isFunction( fn ) ? trim( /[(]([^)]*)[)]/.exec( fn.toString() )[ 1 ].split( ',' ) ) : [];
}
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 [];
    }
977644
protected String getArguments(Object[] args) {

        if (args == null || args.length == 0) {
            return "";
        }

        StringBuilder sb = new StringBuilder();

        if (args.length == 1) {
            Object arg = args[0];
            String param = getSingleArgParameterAsString(arg);
            String displayParam = getSingleArgDisplayParameter(param);
            if (arg instanceof String) {
                sb.append("\"");
                sb.append(displayParam);
                sb.append("\"");
            } else {
                sb.append(displayParam);
            }
        } else {
            for (int i = 0; i < args.length; i++) {
                Object arg = args[i];
                boolean lastArg = i == args.length - 1;
                String param = getParameterAsString(arg);
                String displayParam = getDisplayParameter(param);
                if (arg instanceof String) {
                    sb.append("\"");
                    sb.append(displayParam);
                    sb.append("\"");
                } else {
                    sb.append(displayParam);
                }

                if (!lastArg) {
                    sb.append(",");
                }
            }
        }

        return sb.toString();
    }
295767
function(args) {
  if (!args || args.trim() === '') return;

  try {
    var formatted = args.trim().replace(/([\w\.]+)/g,'"$1"').replace(/" /g, '",');
    return JSON.parse('{' + formatted + '}');
  } catch(e) {
    console.log('Invalid argument format.');
  }

}
419064
function get_args( args, fn_curr, fn_prev ) {
		if ( args.length && OP.toString.call( args[0] ) === '[object Arguments]' ) {
			if ( args.length < 2 && arguments.length > 1 ) {
				if ( fn_curr in internal_method_names )
					return get_args( args[0] );
				if ( fn_prev && fn_curr === fn_prev )
					return args[0];
			}
		}
		return args;
	}
1311206
function format(formatStr) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    return formatArray(formatStr, args);
}
64365
function ( arg ) {
		if ( arg === undefined ) {
			arg = this || utility.$;
		}

		arg = arg.toString().match( regex.reflect )[1];

		return string.explode( arg );
	}
471847
function ( arg ) {
		var result;

		if ( !arg ) {
			return;
		}

		arg = string.trim( arg );

		if ( arg.indexOf( "," ) === -1 ) {
			result = utility.dom( arg );
		}
		else {
			result = [];

			array.each( string.explode( arg ), function ( query ) {
				var obj = utility.dom( query );

				if ( obj instanceof Array ) {
					result = result.concat( obj );
				}
				else if ( obj ) {
					result.push( obj );
				}
			});
		}

		return result;
	}
360104
function(args){
			var arr = [];
			each(args, function(i, str){arr[i] = str});
			return arr;
		}