Object.assign removes special characters that are needed for the pacakge name
and ruins the default value.
509787
function assignDeep(dest, source) {
	if (source && source.constructor === Object) {
		var sourceBaseKeys = Object.keys(source);

		for (var i = 0; i < sourceBaseKeys.length; ++i) {
			var sourceBaseKey = sourceBaseKeys[i];
			var destinationField = dest[sourceBaseKey];
			var sourceField = source[sourceBaseKey];

			if (destinationField === undefined) {
				dest[sourceBaseKey] = sourceField;
			} else {
				// Recursive assign.
				assignDeep(destinationField, sourceField);
			}
		}
	}
}
1061897
function upperCaseObjectKeys(obj) {
  for (const key of Object.getOwnPropertyNames(obj)) {
    const name = key.toUpperCase();
    if (name !== key) {
      obj[name] = obj[key];
      delete obj[key];
    }
  }
  return obj;
}
1274300
function sanitize (val) {
  if (typeof val !== 'string') {
    return '';
  }
  val = val.replace(/&/g,'&amp;');
  val = val.replace(/"/g,'&quot;');
  val = val.replace(/'/g,'&#039;');
  val = val.replace(/</g,'&lt;');
  val = val.replace(/>/g,'&gt;');
  val = val.replace(/\n/g,'<br />');
  return val ;
}
88233
function defaultAssigner(rawproperty, rawvalue) {
	const property = rawproperty.replace(/-+(.|$)/g, ([ , letter]) => letter.toUpperCase());

	return {
		[property]: rawvalue
	};
}
880252
def removeCodedValue(self, name):
        """"""
        for i in self._codedValues:
            if i['name'] == name:
                self._codedValues.remove(i)
                return True
        return False
997165
function revert(object) {
  let lines = [];

  for (let key in object) {
    let value = object[key];
    if (Array.isArray(value)) {
      value.forEach((item) => {
        lines.push(`BEGIN:${key}`);
        lines.push(revert(item));
        lines.push(`END:${key}`);
      });
    } else {
      let fullLine = `${key}:${value}`;
      do {
        // According to ical spec, lines of text should be no longer
        // than 75 octets
        lines.push(fullLine.substr(0, 75));
        fullLine = ' ' + fullLine.substr(75);
      } while (fullLine.length > 1);
    }
  }

  return lines.join('\n');
}
455887
function normalizeAttributeKey(key) {
  const hyphenIndex = key.indexOf('-');

  if (hyphenIndex !== -1 && key.match(HTML_CUSTOM_ATTR_R) === null) {
    key = key.replace(CAPTURE_LETTER_AFTER_HYPHEN, function(_, letter) {
      return letter.toUpperCase();
    });
  }

  return key;
}
439998
private static void removeIntrospectedValue(Map<String, String> m, String name)
   {
      if (m != null)
      {
         m.remove(name);

         if (name.length() == 1)
         {
            name = name.toUpperCase(Locale.US);
         }
         else
         {
            name = name.substring(0, 1).toUpperCase(Locale.US) + name.substring(1);
         }

         m.remove(name);

         if (name.length() == 1)
         {
            name = name.toLowerCase(Locale.US);
         }
         else
         {
            name = name.substring(0, 1).toLowerCase(Locale.US) + name.substring(1);
         }

         m.remove(name);
      }
   }
1035410
function(value) {

		var result = '';

		if (value) {
			result = value.toString();
			result = result[0].toUpperCase() + result.substr(1);
		}

		return result;

	}
629130
function encodeEntities(value) {
        return value.
            replace(/&/g, '&amp;').
            replace(surrogatePairRegexp, function(value) {
                var hi = value.charCodeAt(0),
                    low = value.charCodeAt(1);
                return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';
            }).
            replace(nonAlphanumericRegexp, function(value) {
                return '&#' + value.charCodeAt(0) + ';';
            }).
            replace(/</g, '&lt;').
            replace(/>/g, '&gt;');
    }
190048
function lowerCaseObjectKeys(obj) {
  for (const key of Object.getOwnPropertyNames(obj)) {
    const name = key.toLowerCase();
    if (name !== key) {
      obj[name] = obj[key];
      delete obj[key];
    }
  }
  return obj;
}
137723
@Override
    public Object apply(Object value, Object... params) {

        String original = super.asString(value);

        if (original.isEmpty()) {
            return original;
        }

        char first = original.charAt(0);

        return Character.toUpperCase(first) + original.substring(1);
    }
661679
function removeFormattingTokens(input) {
        if (input.match(/\[[\s\S]/)) {
            return input.replace(/^\[|\]$/g, "");
        }
        return input.replace(/\\/g, "");
    }
944857
def ns(self, value):
        
        if value == self._defaults['ns'] and 'ns' in self._values:
            del self._values['ns']
        else:
            self._values['ns'] = value
615582
function(inName, inValue) {
		if (inValue === null || inValue === false || inValue === "") {
			this.node.removeAttribute(inName);
		} else {
			this.node.setAttribute(inName, inValue);
		}
	}
610743
function remove(object, key){
  utils.assertType(object, 'object', 'object');
  utils.assertString(key, 'key');
  delete object.vals[key.string];
  return object;
}
719097
def assign_literal(element, value):
        
        """
        # Searches for a conversion method specific to the type of value.
        helper = helpers.CAST_DICT.get(type(value), str)

        # Removes all children and attributes.
        element.clear()
        element.text = helper(value)