Normalize a spatial reference object.  Use wkids for spatial references know too proj4, otherwise include the wkt (if available)
@param {*} input
@returns {object} normalized spatial reference object with wkid or wkt (or undefined)
512996
function normalizeSR (input) {
  // The following WKIDs are known to proj4
  const knownWkids = [4326, 4269, 3857, 3785, 900913, 102113]
  let inputWkid

  // Search input for a wkid
  if (Number.isInteger(input) || Number.isInteger(Number(input))) inputWkid = Number(input)
  else if (/EPSG:/.test(input)) inputWkid = Number(input.match(/EPSG:(.*)/)[1])
  else if (input && (input.latestWkid || input.wkid)) inputWkid = input.latestWkid || input.wkid

  // When required input is undefined, return undefined
  if (!input || (_.isObject(input) && !inputWkid && !input.wkt)) return

  // 102100 is the old code for 3857 but not recognized for proj4
  if (inputWkid === 102100) inputWkid = 3857

  // If the input wkid is one of the set known to proj4, return it in an object
  if (knownWkids.includes(inputWkid)) return { wkid: inputWkid }

  // If here, WKID is not known to proj4, so we need its WKT spatial reference in order to do downstream reprojections.  First check in local lookup
  let wkt = wkidLookup[inputWkid]
  if (wkt) return { wkt }

  // If the wkid was not found in the local lookup, check the Esri lookups
  const esriResult = esriProjCodes.lookup(inputWkid)
  if (esriResult) {
    // Add the WKT to the local lookup so we don't need to scan the Esri lookups next time (we have a local lookup, because it will contain a smaller set of wkids than the Esri lookups)
    wkidLookup[inputWkid] = esriResult.wkt
    return { wkt: esriResult.wkt }
  }

  // If here and the inputWkid is defined without a wkt, the input was an unknown wkid without a wkt
  if (inputWkid && !input.wkt && process.env.NODE_ENV !== 'production') {
    console.log(`WARNING: An unknown spatial reference was detected: ${input}`)
  }

  // Input may already be or include a WKT spatial reference
  wkt = input.wkt || input

  // If wkt includes 'WGS_1984_Web_Mercator_Auxiliary_Sphere' return wkid 3857
  if (/WGS_1984_Web_Mercator_Auxiliary_Sphere/.test(wkt)) return { wkid: 3857 }

  try {
    wktParser(wkt)
    return { wkt }
  } catch (err) {
    if (process.env.NODE_ENV !== 'production') {
      console.log(`WARNING: An un-parseable WKT spatial reference was detected: ${wkt}`)
    }
  }
}
53075
@Override
    public Object map(Object input) {
        Number n = (Number) input;
        double val = n.doubleValue();
        return new DoubleWritable((val - mean) / stdev);
    }
828689
@Override
    public Object map(Object input) {
        Number n = (Number) input;
        return doOp(n.intValue());
    }
633689
@Override
    public Object map(Object input) {
        List<Float> row = (List<Float>) input;
        switch (mathOp) {
            case Add:
                float sum = 0f;
                for (Float w : row)
                    sum += w;
                return sum;
            case Subtract:
                return row.get(0) - row.get(1);
            case Multiply:
                float product = 1.0f;
                for (Float w : row)
                    product *= w;
                return product;
            case Divide:
                return row.get(0) / row.get(1);
            case Modulus:
                return row.get(0) % row.get(1);
            case ReverseSubtract:
            case ReverseDivide:
            case ScalarMin:
            case ScalarMax:
            default:
                throw new RuntimeException("Invalid mathOp: " + mathOp); //Should never happen
        }
    }
155529
function object(input, level, options) {
  var spaces = options.spaces;
  var inner = indent(level, spaces);
  var outer = indent(level - 1, spaces);

  var keys = Object.keys(input);
  if (options.sortKeys) keys.sort(naturalSort());
  var str = keys.map(function (key) {
    return inner
      + stringify(key) + ': '
      + format(input[key], level + 1, options);
  }).join(',\n');

  return [ '{', str, outer + '}' ].join('\n');
}
887262
public static function normalize(&$input)
    {
        //==============================================================================
        //      Convert ArrayObjects To Simple Array
        if ($input instanceof ArrayObject) {
            $input = $input->getArrayCopy();
            //==============================================================================
            // Normalize Contents
            self::normalize($input);

        //==============================================================================
        // Normalize Array Contents
        } elseif (is_array($input)) {
            foreach ($input as &$value) {
                self::normalize($value);
            }

            //==============================================================================
        // Normalize Bool as Strings
        } elseif (is_bool($input)) {
            $input = $input ? '1' : '0';

        //==============================================================================
        // Normalize Numbers as Strings
        } elseif (is_numeric($input)) {
            $input = strval($input);
        }

        return $input;
    }
951213
public Object expand(Object input) {
        if (input instanceof List) {
            expandList((List<Object>) input);
            return input;
        } else if (input instanceof Map) {
            expandMap((Map<String, Object>) input);
            return input;
        } else if (input instanceof String) {
            return getJson((String) input);
        } else {
            return input;
        }
    }
241948
function Polygon(input){
    if(input && input.type === "Polygon" && input.coordinates){
      extend(this, input);
    } else if(isArray(input)) {
      this.coordinates = input;
    } else {
      throw "Terraformer: invalid input for Terraformer.Polygon";
    }

    this.type = "Polygon";
  }
722125
public String normalize(String input) {
		char[] c = input.toCharArray();
		normalise(c);
		return new String(c);
	}
163034
@Override
    public Object map(Object input) {
        Number n = (Number) input;
        double val = n.doubleValue();
        if (Double.isNaN(val))
            return new DoubleWritable(0);
        return ratio * (val - min) + newMin;
    }
381437
function( input ) {

		if ( input == null ) {

			input = this.result;

		}

			this.result = input.replace(/(\s[\u0645]+[\u06CC])+\s/g, "$1\u200C");

			this.result = this.result.replace(/([\u0647])+\s+([\u0627]+[\u0645]||[\u0627]+[\u0649]||[\u0627]+[\u0649]+[\u0649]||[\u0627]+[\u0649]+[\u0645]||[\u0649]+[\u0646]+[\u062f]||[\u0627]+[\u0649]+[\u062f])/g, "$1\u200C$2");

			return this;

	}
996060
function normalizeDistance(distance = 0) {
    if (typeof distance !== 'object') distance = { top: distance, left: distance, right: distance, bottom: distance };

    return distance;
}
715657
@Override
    public Object map(Object input) {
        return new Text(map.get(input.toString()));
    }
1052299
function simpleCloneInputData(input) {
    // make a simple copy of the pointers because we will get a reference if we don't
    // we only need clientXY for the calculations
    var pointers = [];
    var i = 0;
    while (i < input.pointers.length) {
        pointers[i] = {
            clientX: round(input.pointers[i].clientX),
            clientY: round(input.pointers[i].clientY)
        };
        i++;
    }

    return {
        timeStamp: now(),
        pointers: pointers,
        center: getCenter(pointers),
        deltaX: input.deltaX,
        deltaY: input.deltaY
    };
}
1339929
function normalizePack (input) {
  const setup = (typeof input === 'function') ? input : input.setup
  const vendor = input.vendor || []

  return {
    _path: input._path,
    setup: setup,
    vendor: vendor
  }
}
691933
function GeoComplete(input, options) {

    this.options = $.extend(true, {}, defaults, options);

    // This is a fix to allow types:[] not to be overridden by defaults
    // so search results includes everything
    if (options && options.types) {
      this.options.types = options.types;
    }

    this.input = input;
    this.$input = $(input);

    this._defaults = defaults;
    this._name = 'geocomplete';

    this.init();
  }
315527
public function normalize($input)
    {
        foreach ($this->normalizers as $normalizer) {
            if ($normalizer->accept($input)) {
                $input = $normalizer->normalize($input);
            }
        }

        return $input;
    }