@tremendous/help
    Preparing search index...

    Function snakeCase

    • Converts a string to snake case. Based on https://es-toolkit.slash.page/reference/string/kebabCase.html

      This function converts a string to snake case, replacing spaces with underscores and converting uppercase letters to lowercase, prefixed with an underscore.

      Parameters

      • string: string

        The string to be converted to snake case.

      Returns string

      The snake case string.

      snakeCase("Hello World"); // "hello_world"
      snakeCase("snakeCaseString"); // "snake_case_string"