dry-rb / dry-inflector

Inflector for Ruby
https://dry-rb.org/gems/dry-inflector
MIT License
95 stars 15 forks source link

Support for lower camel case #15

Closed pabloh closed 6 years ago

pabloh commented 6 years ago

dry-inflector lacks support for lower case camel case conversion like ActiveSupport has, this would useful to have when generating strings for JSON attributes names.

inflector = Dry::Inflector.new

inflector.lower_camelize("first_name") # => "firstName"
inflector.lower_camelize("name") # => "name"

# Or maybe:

inflector.camelize("first_name", lower: true) # => "firstName"
inflector.camelize("name", lower: true) # => "name"
pabloh commented 6 years ago

Copied from Ptico/flexus#3, so we can keep discussing this feature here.