Skip to content

Unit

It generates various random unit data.

Example

(ns your-app.units
(:require [dataimitator.unit.core :refer :all]))
;; Generate a random length unit in English
(def length-unit-en (random-unit-of-length))
(println "Random Length Unit (EN):" length-unit-en)
;; Generate a random length unit in Arabic
(def length-unit-ar (random-unit-of-length :ar))
(println "Random Length Unit (AR):" length-unit-ar)
;; Generate a random volume unit in German
(def volume-unit-de (random-volume-unit :de))
(println "Random Volume Unit (DE):" volume-unit-de)
;; Generate a random volume unit in Spanish
(def volume-unit-es (random-volume-unit :es))
(println "Random Volume Unit (ES):" volume-unit-es)
;; Generate a random weight unit in French
(def weight-unit-fr (random-weight-unit :fr))
(println "Random Weight Unit (FR):" weight-unit-fr)
;; Generate a random weight unit in Turkish
(def weight-unit-tr (random-weight-unit :tr))
(println "Random Weight Unit (TR):" weight-unit-tr)