GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — toSnakeCaseName | ADK for TypeScript: API Reference - v2.5.0

  • toSnakeCaseName

Function toSnakeCaseName

  • toSnakeCaseName(text: string): string

    Converts one string into snake_case.

    Handles lowerCamelCase, UpperCamelCase and space-separated text, as well as acronyms such as REST API and runs of consecutive uppercase letters.

    The Name suffix separates this from toSnakeCase in object_notation_utils.ts, which converts the keys of an object and takes a different argument.

    Parameters

    • text: string

      The input string.

    Returns string

    The snake_case form of text.

    Example

    toSnakeCaseName('camelCase'); // 'camel_case'
    toSnakeCaseName('UpperCamelCase'); // 'upper_camel_case'
    toSnakeCaseName('REST API'); // 'rest_api'
    • Defined in core/src/utils/case_utils.ts:104
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.