Clojure Chilean RUT implementation
Clojure
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
src/chileno
test/chileno
.gitignore
README.md
project.clj

README.md

chileno

Chileno is a clojure implementation of chilean RUT

If you are looking for a pure Java implementation, look here

Usage

in your project.clj:

[chileno "0.1.1"]

Examples

(require '[chileno.core :as rut])

(rut/make "11.111.111-1")
;; or
(rut/make "11.111.111" "1")
;; or
(rut/make "11111111-1")
;; when the rut is valid it will yield a record chileno.core.Rut{:run "11111111", :dv "1"}
;; otherwise it will return an empty map {}


;; there is also a predicate rut/valid? that will return true for the same parameters that rut/make would have returned a record

License

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