Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/r0man/inflections-clj

Rails-like inflection library for Clojure and ClojureScript
https://github.com/r0man/inflections-clj

Last synced: 9 days ago
JSON representation

Rails-like inflection library for Clojure and ClojureScript

Awesome Lists containing this project

README

        

* Inflections

[[https://clojars.org/inflections][https://img.shields.io/clojars/v/inflections.svg]]
[[https://github.com/r0man/inflections-clj/actions?query=workflow%3A%22Clojure+CI%22][https://github.com/r0man/inflections-clj/workflows/Clojure%20CI/badge.svg]]
[[https://versions.deps.co/r0man/inflections-clj][https://versions.deps.co/r0man/inflections-clj/status.svg]]
[[https://versions.deps.co/r0man/inflections-clj][https://versions.deps.co/r0man/inflections-clj/downloads.svg]]

Rails-like inflection library for Clojure and ClojureScript.

** Usage

#+BEGIN_EXAMPLE
(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"
#+END_EXAMPLE

** License

Copyright (C) 2013-2022 [[https://github.com/r0man][r0man]]

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