The pascalcase helper converts a string to PascalCase format, capitalizing the first letter of each word and removing all separators. Use it when you need class-style or identifier-style naming where every word starts with an uppercase letter.
Syntax
{{pascalcase value}}
value -- The string to convert. Required. Non-string inputs (numbers, booleans) are converted to strings before processing. Arrays of primitive values are converted to a comma-separated string. Objects and object arrays produce unusable output.
Examples
Convert a space-separated string
{{pascalcase record.product.type}}
Input:
{ "record": { "product": { "type": "hand crafted item" } } }
Output: HandCraftedItem
Convert a dash-separated string
{{pascalcase record.category}}
Input:
{ "record": { "category": "new-arrival-products" } }
Output: NewArrivalProducts
Preserve numbers in the output
{{pascalcase record.code}}
Input:
{ "record": { "code": "order_123_id" } }
Output: Order123Id
Numbers are preserved in place. Separators around numbers are removed.
Usage notes
- The first letter of every word is capitalized and separators (spaces, dashes, underscores) are removed.
- Unlike
camelcase, the first letter of the output is always uppercase. - Numbers are preserved in the output (e.g.
"order_123_id"→Order123Id). - Do not pass objects or object arrays -- the output will be unusable.