• Formats the given string in snake case fashion

    snake('hello world') -> 'hello_world' snake('va va-VOOM') -> 'va_va_voom' snake('helloWord') -> 'hello_world'

    Parameters

    • str: string
    • Optional options: {
          splitOnNumber?: boolean;
      }
      • Optional splitOnNumber?: boolean

    Returns string