Type Alias: KeyFormat
KeyFormat =
"camel"|"kebab"|"pascal"|"snake"
Defined in: src/key-format.ts:19
The key format for request serialization or response normalization.
Keys that are already all-uppercase (e.g. URL, ID, HTTP) pass through unchanged to preserve acronyms. To transform them, supply a custom function instead of a preset format.
Example
ts
import { createClient } from 'sorbus';
import { contract } from './contract';
const api = createClient(contract, '/api/v1', {
serializeKey: 'snake',
normalizeKey: 'camel',
});