# formatKeys static method

String formatKeys(

1. String key,
2. String delimiter

)

Formats map keys (snake_case, kebab-case, camelCase)

## Parameters

- `key`: The key to format
- `delimiter`: The delimiter to use for formatting keys

## Returns

- The formatted key

## Implementation

    static String formatKeys(String key, String delimiter) {
      switch (delimiter) {
        case '_':
          return key.replaceAllMapped(RegExp(r'([a-z])([A-Z])'), (m) => '${m[1]}_${m[2]!.toLowerCase()}');
        case '-':
          return key.replaceAllMapped(RegExp(r'([a-z])([A-Z])'), (m) => '${m[1]}-${m[2]!.toLowerCase()}');
        default:
          return key; // Return as is
      }
    }