function addField(src, {
  name,
  value
}) {
  const FIND = `  siteMetadata: {\n`;
  const REPLACE = `  siteMetadata: {\n      ${name}: \`${value}\`,\n`;
  const modifiedConfig = src.replace(FIND, REPLACE);
  return modifiedConfig;
}
/**
 * Does a string replace by searching for beginning of "siteMetadata"
 * Then it adds the name + value as the next key of that object
 */
Does a string replace by searching for beginning of "siteMetadata"
Then it adds the name + value as the next key of that object
Does a string replace by searching for beginning of " siteMetadata " Then it adds the name + value as the next key of that object
function addField(src, {
  name,
  value
}) {
  const FIND = `  siteMetadata: {\n`;
  const REPLACE = `  siteMetadata: {\n      ${name}: \`${value}\`,\n`;
  const modifiedConfig = src.replace(FIND, REPLACE);
  return modifiedConfig;
}
function addField ( src , { name , value } ) { const FIND = ` \n ` ; const REPLACE = ` \n ${ name } \` ${ value } \` \n ` ; const modifiedConfig = src . replace ( FIND , REPLACE ) ; return modifiedConfig ; }
Does a string replace by searching for beginning of "siteMetadata"
 Then it adds the name + value as the next key of that object
Does a string replace by searching for beginning of " siteMetadata " Then it adds the name + value as the next key of that object