function escapeUserProvidedKey(text) {
  return ('' + text).replace(
    userProvidedKeyEscapeRegex,
    userProvidedKeyEscaper
  );
}
Escape a component key so that it is safe to use in a reactid.

@param {*} key Component key to be escaped.
@return {string} An escaped string.