Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.09 KB

README.org

File metadata and controls

44 lines (29 loc) · 1.09 KB

Inflections

https://img.shields.io/clojars/v/inflections.svg https://github.com/r0man/inflections-clj/workflows/Clojure%20CI/badge.svg https://versions.deps.co/r0man/inflections-clj/status.svg https://versions.deps.co/r0man/inflections-clj/downloads.svg

Rails-like inflection library for Clojure and ClojureScript.

Usage

(use 'inflections.core)

(plural "word")
;=> "words"

(plural "virus")
;=> "viri"

(pluralize 12 "virus")
;=> "12 viri"

(singular "apples")
;=> "apple"

(singular "octopi")
;=> "octopus"

(underscore "puni-puni")
;=> "puni_puni"

(ordinalize "52")
;=> "52nd"

(capitalize "clojure")
;=> "Clojure"

License

Copyright (C) 2013-2022 r0man

Distributed under the Eclipse Public License, the same as Clojure.