Function camelCase

Converts a string to camelCase. Handles various separators: spaces, hyphens, underscores, and transitions between cases.

camelCase('hello-world');
// => 'helloWorld'

camelCase('hello_world_test');
// => 'helloWorldTest'
  • Parameters

    • str: string

      String to convert

    Returns string

    camelCased string