matthewbaggett/twig-extension-transform

Add the ability to transform from one case style to another programatically.

v1.3 2021-05-16 03:52 UTC

This package is auto-updated.

Last update: 2024-11-16 11:31:59 UTC


README

Build Status

Add the ability to transform from one case style to another programatically.

Example:

{{ input|transform_camel_to_snake }} will output this_is_an_example for the input thisIsAnExample

###Supported transformers:

Any combination of the following:

  • Camel thisIsAnExample
  • Snake this_is_an_example
  • Screaming Snake THIS_IS_AN_EXAMPLE
  • Spinal this-is-an-example
  • Studly Caps ThisIsAnExample

using the format 'transform-from-to-target'

Credits

Written ontop of the wonderful Camel package written by Matthieu Moquet