clj-commons / camel-snake-kebab

A Clojure[Script] library for word case conversions
https://clj-commons.org/camel-snake-kebab/
Eclipse Public License 1.0
475 stars 48 forks source link

suggestion: support for plain text output #74

Open timrobinson33 opened 3 years ago

timrobinson33 commented 3 years ago

Converting to plain text would be useful for constructing user messages e.g.

(defn validate-field [object attr]
  (when-not (object attr)
    (str (csk/->plain-text attr) " is mandatory")))

(validate-field user :work-email-address)
=> "Work email address is mandatory"

You'd probably need upper case, lower case, sentence case and title case.