Kebab Case
Synopsis
Converts strings to kebab-case format.
Schema
- kebabcase:
field: <ident>
target_field: <string>
fields: <array>
exclude: <array>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
Field | Required | Default | Description |
---|---|---|---|
field | N | - | Single field to convert to kebab-case |
target_field | N | Same as field | Target field to store kebab-case result |
fields | N | - | Array of fields to convert to kebab-case |
exclude | N | - | Array of fields to exclude from conversion |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if conversion fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
Converts string values to kebab-case format by replacing spaces, underscores, dots, and other separators with hyphens, then converting all characters to lowercase. This format is commonly used in URLs, CSS classes, file names, and command-line parameters.
The processor handles various input formats and normalizes them to the consistent kebab-case style with lowercase letters separated by hyphens.
kebab-case format uses hyphens as separators and converts all text to lowercase, resulting in format like "user-name", "api-response-data", or "system-config-value". It's called kebab-case because the hyphens look like skewers.
The processor preserves the logical word boundaries from the input while standardizing the format for consistent usage in web development and system naming.
Consecutive separators in the input may result in multiple consecutive hyphens in the output. The processor does not automatically clean up redundant separators.
Examples
Basic Conversion
Converting field to kebab-case format... |
|
converts to kebab-case: |
|
URL Slug Generation
Creating URL-friendly slug from title... |
|
creates URL-friendly identifier: |
|
Mixed Format Input
Normalizing mixed separators to kebab-case... |
|
standardizes all separators to hyphens: |
|
Multiple Fields
Converting multiple fields to kebab-case... |
|
processes all specified fields: |
|