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B,OAAO,EAAO,KAAK,GACrB,CAEA,SAAS,UAAU,GACjB,MAAM,EAAS,EAAM,MAAM,IACrB,EAAS,GACf,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,GAAK,EACpB,MAAd,EAAO,KACT,EAAO,KAAK,KACZ,GAAK,GAEP,EAAO,KAAK,EAAO,IAErB,OAAO,EAAO,KAAK,GACrB,CAEA,SAAS,UAAU,GACjB,MAAM,EAAS,EAAM,MAAM,IACrB,EAAS,GACf,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,GAAK,EACpB,MAAd,EAAO,KACT,EAAO,KAAK,KACZ,GAAK,GAEP,EAAO,KAAK,EAAO,IAErB,OAAO,EAAO,KAAK,GACrB,CAEA,SAAS,UAAU,GACjB,MAAM,EAAS,EAAM,MAAM,IACrB,EAAS,GACf,IAAK,IAAI,EAAI,EAAG,EAAI,EAAO,OAAQ,GAAK,EACpB,MAAd,EAAO,KACT,GAAK,GAEe,MAAlB,EAAO,EAAI,GACb,EAAO,KAAK,EAAO,GAAG,eAEtB,EAAO,KAAK,EAAO,IAGvB,OAAO,EAAO,KAAK,GACrB","file":"/npm/mytextedit@1.0.3/lib.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/mytextedit@1.0.3/lib.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Write a function that uppercases the first character of string\n// Write a function to capitalize every letter\n// Write a function that uppercases the first letter of each word in a string\n// Write a function that uppercases every other letter\n// Write a function that removes all whitespace from a given string\n// Write a function that removes only the extra whitespace from a given string (“a      b ” → “a b”)\n// Write a function that kebab case\n// Write a function that snake case\n// Write a function that camel case\n// Write a function that shifts each letter\n\n////// LEAN MAP, FILTER, REDUCE IN PYTHON !!!!!!!\n\n\n// USE FOR_EACH OR MAP, FILTER, REDUCE\nfunction upperCase(input) {\n  const corpus = input.split('');\n  const string = [];\n  // NOT EFFICIENT\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (i === 0) {\n      string.push(corpus[i].toUpperCase());\n    } else {\n      string.push(corpus[i]);\n    }\n  }\n\n  return string.join('');\n}\n\nfunction upperCaseEveryWord(input) {\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (corpus[i - 1] === undefined) {\n      string.push(corpus[i].toUpperCase());\n      i += 1;\n    }\n    if (corpus[i - 1] === ' ') {\n      string.push(corpus[i].toUpperCase());\n    } else {\n      string.push(corpus[i]);\n    }\n  }\n  return string.join('');\n}\n\nfunction upperCaseEveryOtherLetter(input) {\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (i % 2 === 0) {\n      string.push(corpus[i].toUpperCase());\n    } else {\n      string.push(corpus[i]);\n    }\n  }\n  return string.join('');\n}\n\nfunction deleteSpaces(input) {\n  // Do a .split() on the ' 's, you'd have an array of all characters that aren't a space, then .join()\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (corpus[i] !== ' ') {\n      string.push(corpus[i]);\n    }\n  }\n  return string.join('');\n}\n\nfunction deleteExtraSpaces(input) {\n  // Use string.trim() to remove trailing ' 's\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (corpus[i + 1] === ' ') {\n      if (corpus[i] !== ' ') {\n        string.push(corpus[i]);\n      }\n    } else {\n      string.push(corpus[i]);\n    }\n  }\n  return string.join('');\n}\n\nfunction kabobCase(input) {\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (corpus[i] === ' ') {\n      string.push('-');\n      i += 1;\n    }\n    string.push(corpus[i]);\n  }\n  return string.join('');\n}\n\nfunction snakeCase(input) {\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (corpus[i] === ' ') {\n      string.push('_');\n      i += 1;\n    }\n    string.push(corpus[i]);\n  }\n  return string.join('');\n}\n\nfunction camelCase(input) {\n  const corpus = input.split('');\n  const string = [];\n  for (let i = 0; i < corpus.length; i += 1) {\n    if (corpus[i] === ' ') {\n      i += 1;\n    }\n    if (corpus[i - 1] === ' ') {\n      string.push(corpus[i].toUpperCase());\n    } else {\n      string.push(corpus[i]);\n    }\n  }\n  return string.join('');\n}\n \n\n// TESTS\n// console.log(upperCase('testing'));\n// console.log(upperCaseEveryWord('testing one two three four five'));\n// console.log(upperCaseEveryOtherLetter('supercalifragilisticexpialidocious'));\n// console.log(deleteSpaces('testing one two three four five'));\n// console.log(deleteExtraSpaces('testing   one                     two     three    four              five'));\n// console.log(kabobCase('testing one'));\n// console.log(snakeCase('testing one'));\n// console.log(camelCase('chicken fried rice'));\n"]}