Formats the WSFCDomainProfile object removing arguments that are empty
343411
def format_wsfc_domain_profile(result):
    '''
    
    '''
    from collections import OrderedDict
    # Only display parameters that have content
    order_dict = OrderedDict()
    if result.cluster_bootstrap_account is not None:
        order_dict['clusterBootstrapAccount'] = result.cluster_bootstrap_account
    if result.domain_fqdn is not None:
        order_dict['domainFqdn'] = result.domain_fqdn
    if result.ou_path is not None:
        order_dict['ouPath'] = result.ou_path
    if result.cluster_operator_account is not None:
        order_dict['clusterOperatorAccount'] = result.cluster_operator_account
    if result.file_share_witness_path is not None:
        order_dict['fileShareWitnessPath'] = result.file_share_witness_path
    if result.sql_service_account is not None:
        order_dict['sqlServiceAccount'] = result.sql_service_account
    if result.storage_account_url is not None:
        order_dict['storageAccountUrl'] = result.storage_account_url

    return order_dict
1212437
def _format_args():
        """"""
        if request and request.args.get('prettyprint'):
            return dict(
                indent=2,
                separators=(', ', ': '),
            )
        else:
            return dict(
                indent=None,
                separators=(',', ':'),
            )
611412
def _remove_empty_output(self):
        
        output = []
        for key in self.output_dict:
            if self.output_dict[key] is not None and 'full_text' in self.output_dict[key]:
                output.append(self.output_dict[key])
        return output
636925
function getParameterDescriptor (parameter) {
  var parts = parameter.split(SLASHED_BRACKETS_REG_EXP);

  return {
    name: parts[0].trim().substring(1)
  };
}
1185931
function empty() {
		var mw = plain();

		mw.plain = function (str) {
			str = String(str);
			var ret = '';
			for (var i = 0; i < str.length; i++) {
				ret += ' ';
			}
			return ret;
		};
		mw.toString = function () {
			return '<ministyle-empty>';
		};
		return mw;
	}
1216210
function formatNodeValue(node, profile) {
	if (node.value != null && reNl.test(node.value)) {
		const indent = profile.indent(1);
		return splitByLines(node.value).map((line, i) => `${indent}${i ? ' ' : '|'} ${line}`).join('\n');
	}

	return node.value;
}
1034150
function format(template, values) {
	return Object
		.entries(values)
		.filter(
			([key]) => /^[a-z0-9_-]+$/gi.test(key)
		)
		.map(
			([key, value]) =>
				[new RegExp(`([^{]|^){${key}}([^}]|$)`,'g'), `$1${value}$2`]
		)
		.reduce(
			(str, [regexp, replacement]) => {
				return str.replace(regexp, replacement)
			}, template
		)
		.replace(/({|}){2}/g, '$1')
}
992436
function format (str, ...args) {
  return str.replace(/{(\d+)}/g, function (match, number) {
    return typeof args[number] === 'undefined'
      ? match
      : args[number]
    ;
  })
}
1344764
function format (obj) {
  if (!obj || typeof obj !== 'object') {
    throw new TypeError('argument obj is required')
  }

  var parameters = obj.parameters
  var type = obj.type

  if (!type || !TYPE_REGEXP.test(type)) {
    throw new TypeError('invalid type')
  }

  var string = type

  // append parameters
  if (parameters && typeof parameters === 'object') {
    var param
    var params = Object.keys(parameters).sort()

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

      if (!TOKEN_REGEXP.test(param)) {
        throw new TypeError('invalid parameter name')
      }

      string += '; ' + param + '=' + qstring(parameters[param])
    }
  }

  return string
}
1201249
def whereless(self, fieldname, value):
        
        return self.mask([elem < value for elem in self[fieldname]])
590978
def format_stack(skip=0, length=6, _sep=os.path.sep):
    
    return ' < '.join("%s:%s:%s" % (
        '/'.join(f.f_code.co_filename.split(_sep)[-2:]),
        f.f_lineno,
        f.f_code.co_name
    ) for f in islice(frame_iterator(sys._getframe(1 + skip)), length))
1023319
function formatFileName(filepath) {

        var validFilename;

        validFilename = filepath.replace(/\s/g, options.separator);
        validFilename = validFilename.replace(/[^a-zA-Z_0-9.]/, '');
        validFilename = validFilename.toLowerCase();

        return validFilename;
    }
1326339
function formatAttributes(outNode, profile) {
	const node = outNode.node;

	return node.attributes.map(attr => {
		if (attr.options.implied && attr.value == null) {
			return null;
		}

		const attrName = profile.attribute(attr.name);
		let attrValue = null;

		// handle boolean attributes
		if (attr.options.boolean || profile.get('booleanAttributes').indexOf(attrName.toLowerCase()) !== -1) {
			if (profile.get('compactBooleanAttributes') && attr.value == null) {
				return ` ${attrName}`;
			} else if (attr.value == null) {
				attrValue = attrName;
			}
		}

		if (attrValue == null) {
			attrValue = outNode.renderFields(attr.value);
		}

		return attr.options.before && attr.options.after
			? ` ${attrName}=${attr.options.before+attrValue+attr.options.after}`
			: ` ${attrName}=${profile.quote(attrValue)}`;
	}).join('');
}
390979
function sn_format_fmt() {
	if ( !arguments.length ) {
		return;
	}
	var i = 0,
		formatted = arguments[i],
		regexp,
		replaceValue;
	for ( i = 1; i < arguments.length; i += 1 ) {
		regexp = new RegExp('\\{'+(i-1)+'\\}', 'gi');
		replaceValue = arguments[i];
		if ( replaceValue instanceof Date ) {
			replaceValue = (replaceValue.getUTCHours() === 0 && replaceValue.getMinutes() === 0 
				? sn.format.dateFormat(replaceValue) : sn.format.dateTimeFormatURL(replaceValue));
		}
		formatted = formatted.replace(regexp, replaceValue);
	}
	return formatted;
}
108843
function format(str, args) {
        var keys = Object.keys(args), i;
        for (i=0; i<keys.length; i++) {
            str = str.replace(new RegExp("\\{" + keys[i] + "\\}", "gi"), args[keys[i]]);
        }
        return str;
    }
231628
def to_h(all=false)
      filter_parameters.select{|k,v| all || !v.blank?}
    end
411217
function format(pathObject) {
    if (!isObject(pathObject)) {
      throw new TypeError('Parameter `pathObject` must be an object, not ' +
        typeof pathObject);
    }

    var root = pathObject.root || '';

    if (!isString(root)) {
      throw new TypeError('`pathObject.root` must be a string or undefined, not '  + 
        typeof pathObject.root);
    }

    var dir = pathObject.dir ? pathObject.dir + '/' : '';
    var base = pathObject.base || '';
    return dir + base;
  }