@eroyeroy/utils - v0.1.0
    Preparing search index...

    Function snakeCase

    • Converts a string to snake_case. Handles camelCase, kebab-case, PascalCase, and space-separated words.

      Parameters

      • str: string

        The input string.

      Returns string

      snakeCase("helloWorld") // => "hello_world"
      snakeCase("HelloWorld") // => "hello_world"
      snakeCase("hello-world") // => "hello_world"