Transforms string keys into PascalCase format. Implements (BasaltKeyTransformer).

Implements

Constructors

Methods

Constructors

Methods

  • Transforms a single key from any case to PascalCase.

    Parameters

    • key: string

      The key string to transform into PascalCase.

    Returns string

    The key string transformed into PascalCase, with the first letter of each word capitalized.

    transformKey('my_key_name');
    Returns "MyKeyName"
    transformKey('my-key-name');
    Returns "MyKeyName"
    transformKey('myLongKeyName');
    Returns "MyLongKeyName"