Version: v0.8.1 - Beta.  We welcome contributors & feedback.

String.toHumanized

toHumanized() -> string

Description

Convert a technical-sounding token (e.g. a database column name like 'userId'), to a label that is human-friendly.

This will also remove any 'ID' suffix.

'blogTitle'.toHumanized()
//= 'Blog Title'

'bannerColorId'.toHumanized()
//= 'Banner Color'

See Also