packages/react/src/ReactChildren.js
/**
 * Escape and wrap key so it is safe to use as a reactid
 *
 * @param {string} key to be escaped.
 * @return {string} the escaped key.
 */
Escape and wrap key so it is safe to use as a reactid
@param {string} key to be escaped.
@return {string} the escaped key.
Escape and wrap key so it is safe to use as a reactid @param { string } key to be escaped . @return { string } the escaped key .
function escape(key) {
  const escapeRegex = /[=:]/g;
  const escaperLookup = {
    '=': '=0',
    ':': '=2',
  };
  const escapedString = ('' + key).replace(escapeRegex, function(match) {
    return escaperLookup[match];
  });
  return '$' + escapedString;
}
function escape ( key ) { const escapeRegex = / [=:] / g ; const escaperLookup = { '=' : '=0' , ':' : '=2' , } ; const escapedString = ( '' + key ) . replace ( escapeRegex , function ( match ) { return escaperLookup [ match ] ; } ) ; return '$' + escapedString ; }
Escape and wrap key so it is safe to use as a reactid
 @param {string} key to be escaped.
Escape and wrap key so it is safe to use as a reactid @param { string } key to be escaped .