Closed johndpope closed 7 years ago
We try to avoid dependencies, especially if they are A) too new, or B) unmaintained.
Our filters might not match other implementations, that's why we have documentation about how they work: https://github.com/SwiftGen/StencilSwiftKit/blob/master/Documentation/filters-strings.md
We usually do something like value|snakeToCamelCase|lowerFirstWord
in our templates (see https://github.com/SwiftGen/templates).
Hi @johndpope
Thanks for the suggestion.
As @djbe said though, and after reviewing the library quickly, I don't think it's worth adding a dependency just for this kind of feature. Adding a dependency, especially one we don't have control over (contrary to Stencil and PathKit for which we work closely with the other and know he's active), might ends being a blocker if the dep isn't active, and is only worth it if it provides significant functionality that would be tedious to reproduce and maintain.
This is not the case for our casing filters, especially also because we want the ones we use to be configurable, composable and fit for use in templates (so use |snakeToCamelCase|lowerFirstWord
to compose filters), unlike the ones from that library that are strict and less composable.
So in conclusion, drawing a dependency only for those few filters doesn't seem worth it to me, and thus I'm closing the issue. Thanks for the suggestion though! 👍
after actually using the function in template - it works well when chaining together.
https://github.com/uberbruns/CasingTools
why bother?
I was expecting the snakeToCamelCase to have a lower case letter for first. eg. func AccumulatorNumAccumulated()
->
func accumulatorNumAccumulated()