mattt/TransformerKit — pull request #2 by mrackwitz (2013-01-29 09:47:31+00:00)
Title: Added some transformers

Added transformers for:
* "CamelCaseString"/"llamaCaseString" to "whitespace separated string"
* "CamelCaseString"/"llamaCaseString" to "snake_case_string"
* "snake_case_string" to "CamelCaseString"
* "snake_case_string" to "llamaCaseString"

For the first, I didn't use reverse transformer ability, because there are some edge cases, where you could not clearly reverse a transformation, so that f(g(x)) != x, where f is the original transformer and g the reverse transformer.

Furthermore I think there is now a lot of duplication in this transformers. Maybe we should
split the existing transformers in two phases:

* Split a string into an array of components (by whitespace, underscore or uppercase chars)
* Join an array of components (to llamaCase, CamelCase, snake_case or train-case)

Then we could introduce a possibilty, which makes it easy to chain transformers and provide under the existing or similar keys ready-to-use transformer chains from string to string.
What do you think about that?