Normalize both text and status options.
426676
def _normalize_options(options)
        _normalize_text(options)

        if options[:html]
          options[:html] = ERB::Util.html_escape(options[:html])
        end

        if options[:status]
          options[:status] = Rack::Utils.status_code(options[:status])
        end

        super
      end
709328
function normalize_texts(texts) {
  let ret = []

  let content = []
  let cur_text = texts[0] // Holds the styles in this group of texts

  for (const text of texts) {
    if (text.bold !== cur_text.bold
        || text.italic !== cur_text.italic
        || text.underline !== cur_text.underline
        || text.href !== cur_text.href) {
      ret.push(new Text(
        content.join(''),
        cur_text.bold,
        cur_text.italic,
        cur_text.underline,
        cur_text.href
      ))
      cur_text = text
      content = []
    }

    content.push(text.text)
  }

  // content is non-empty: texts is never empty
  ret.push(new Text(
    content.join(''),
    cur_text.bold,
    cur_text.italic,
    cur_text.underline,
    cur_text.href
  ))

  return ret
}
263776
protected function normalizeOptions()
    {
        // not allowed empty container
        !$this->containerTag && $this->containerTag = 'div';

        if(!isset($this->containerOptions['id']) || empty($this->containerOptions['id'])) {
            $this->containerOptions['id'] = $this->getId();
        }
    }
1228349
function normalizeOptions(optionValue) {
    if (typeof optionValue === "string") {
        return {
            arrays: optionValue,
            objects: optionValue,
            imports: optionValue,
            exports: optionValue,

            // For backward compatibility, always ignore functions.
            functions: "ignore"
        };
    }
    if (typeof optionValue === "object" && optionValue !== null) {
        return {
            arrays: optionValue.arrays || DEFAULT_OPTIONS.arrays,
            objects: optionValue.objects || DEFAULT_OPTIONS.objects,
            imports: optionValue.imports || DEFAULT_OPTIONS.imports,
            exports: optionValue.exports || DEFAULT_OPTIONS.exports,
            functions: optionValue.functions || DEFAULT_OPTIONS.functions
        };
    }

    return DEFAULT_OPTIONS;
}
1033843
function normalizeToBase(text) {
		var rExps = [
			{re: /[\xC0-\xC6]/g, ch: "A"},
			{re: /[\xE0-\xE6]/g, ch: "a"},
			{re: /[\xC8-\xCB]/g, ch: "E"},
			{re: /[\xE8-\xEB]/g, ch: "e"},
			{re: /[\xCC-\xCF]/g, ch: "I"},
			{re: /[\xEC-\xEF]/g, ch: "i"},
			{re: /[\xD2-\xD6]/g, ch: "O"},
			{re: /[\xF2-\xF6]/g, ch: "o"},
			{re: /[\xD9-\xDC]/g, ch: "U"},
			{re: /[\xF9-\xFC]/g, ch: "u"},
			{re: /[\xC7-\xE7]/g, ch: "c"},
			{re: /[\xD1]/g, ch: "N"},
			{re: /[\xF1]/g, ch: "n"}
		];
		$.each(rExps, function () {
			text = text.replace(this.re, this.ch);
		});
		return text;
	}
396771
def normalize(text: str) -> str:
    
    for data in _NORMALIZE_RULE2:
        text = re.sub(data[0].replace("t", "[่้๊๋]"), data[1], text)
    for data in list(zip(_NORMALIZE_RULE1, _NORMALIZE_RULE1)):
        text = re.sub(data[0].replace("t", "[่้๊๋]") + "+", data[1], text)
    return text
1354579
public void normalize() {
        for (int i = 0; i < size; i++) {
            keys[i] = lowerCase(keys[i]);
        }
    }
620961
function normalizeModuleIdentifiers(ast, load, options) {
	visitRequireArgument(ast, function(argument) {
		var normalized = optionsNormalize(
			options,
			argument.value,
			load.name,
			load.address
		);

		argument.value = normalized;
		argument.raw = `"${normalized}"`;
	});
}
215711
def normalize_unf(self, value):
        """"""
        if isinstance(value, unicode):
            return unicodedata.normalize('NFC', value)
        else:
            return value
677481
public static String normalize(final String text, final Configuration config){
        if(text != null && config.isNormalizeLabelText()){
            return text.trim().replaceAll("[\n\r]", "").replaceAll("[\t 　]+", " ");
        }
        return text;
    }
453628
def _normalize_string(self, text):
        '''
        '''
        conversion = {
            # newlines
            '\r?\n': ' ',
            # replace excessive empty spaces
            '\s+': ' ',
            # convert all types of hyphens/dashes to a
            # simple old-school dash
            # from http://utf8-chartable.de/unicode-utf8-table.pl?
            # start=8192&number=128&utf8=string-literal
            '‐': '-',
            '‑': '-',
            '‒': '-',
            '–': '-',
            '—': '-',
            '―': '-',
        }
        for find, replace in six.iteritems(conversion):
            text = re.sub(find, replace, text, flags=re.UNICODE)
        return text
1121305
def parse(text, **options):
    
    _options = copy.copy(DEFAULT_OPTIONS)
    _options.update(options)

    return _normalize(_parse(text, **_options), **_options)
1185496
def _normalize(value):
        
        if hasattr(value, 'value'):
            value = value.value
        if value is not None:
            value = long(value)
        return value
153397
def normalize(path, **kwargs):
    """"""
    import os.path
    return os.path.normpath(path, **kwargs)
975342
function normalizeFns(fns) {
  Object.keys(fns).forEach(function(key) {
    var handler = fns[key];
    if (typeof handler === 'function') {
      fns[key] = {
        enter: handler,
        leave: noop
      };
    }
  });
}
524150
function normalizeOptions(options, Ctor) {
  if (!options) {
    return null;
  }

  if (options instanceof Ctor) {
    return options;
  }

  var instance = new Ctor();

  Object.keys(options).forEach(function(key) {
    if (typeof options[key] !== "undefined") {
      instance[key] = options[key];
    }
  });

  return instance;
}
174749
def normalize_value(values)
      Array.wrap(values).map do |value|
        value.is_a?(String) ? value.gsub("\n", "") : value
      end
    end