@bytebury/sauce - v1.13.0
    Preparing search index...

    Function snake

    • Converts a string to snake_case by replacing spaces and punctuation with underscores. Uses kebab() internally, replacing hyphens with underscores.

      Parameters

      • text: string

      Returns string

      This is null | undefined safe. If you pass null | undefined then this will return "".

      snake(null); // ""
      snake("Hello World"); // "hello_world"
      snake("User-Profile Page"); // "user_profile_page"