Back to Lowdefy

@lowdefy/operators-change-case

code-docs/plugins/operators/change-case.md

5.2.01.3 KB
Original Source

@lowdefy/operators-change-case

String case conversion operator using change-case.

Operator

OperatorPurpose
_change_caseConvert string case

Usage

yaml
result:
  _change_case:
    on: hello world
    case: camelCase

Case Types

CaseInputOutput
camelCasehello worldhelloWorld
capitalCasehello worldHello World
constantCasehello worldHELLO_WORLD
dotCasehello worldhello.world
headerCasehello worldHello-World
noCasehelloWorldhello world
paramCasehello worldhello-world
pascalCasehello worldHelloWorld
pathCasehello worldhello/world
sentenceCasehello worldHello world
snakeCasehello worldhello_world

Examples

URL Slug

yaml
slug:
  _change_case:
    on:
      _state: title
    case: paramCase

Constant Name

yaml
constName:
  _change_case:
    on:
      _state: fieldName
    case: constantCase

Display Title

yaml
displayName:
  _change_case:
    on:
      _state: key
    case: capitalCase