StencilSwiftKit icon indicating copy to clipboard operation
StencilSwiftKit copied to clipboard

Change our filters to accept a `mode` parameter instead of a boolean.

Open djbe opened this issue 7 years ago • 0 comments

Some of our current filters accept a boolean parameter, which isn't always clear "what" that parameter is for:

  • camelToSnakeCase: lowercase the components or not
  • snakeToCamelCase: trim empty components

For some of our other filters, we already use a "mode" string parameter, that says a bit more about what it does:

  • removeNewlines: all or leading
  • swiftIdentifier: normal or pretty

Suggestions for modes:

  • camelToSnakeCase: lowercase or none
  • snakeToCamelCase: trim-empty or none

djbe avatar Sep 04 '18 22:09 djbe