Journalism Format - v1.1.12
    Preparing search index...

    Function camelCase

    • Converts a string into camelCase. This is useful for creating variable names or object keys from human-readable text.

      Parameters

      • input: string

        The string to convert to camelCase. It can contain spaces, punctuation, and mixed casing.

      Returns string

      The camelCased version of the input string.

      // Basic conversion
      const result1 = camelCase("hello world");
      console.log(result1); // "helloWorld"
      // With punctuation and mixed case
      const result2 = camelCase(" --Some@Thing is- happening-- ");
      console.log(result2); // "someThingsHappening"
      // With a single word
      const result3 = camelCase("Journalism");
      console.log(result3); // "journalism"