Back

slug (clj)

(source)

function

(slug s)
Transform text into a URL slug.

Examples

aliostad/deep-learning-lang-detection
(ns shared.models.query.index
  (:require [shared.specs.core :as specs]
            [cljs.spec :as spec]
            [cljs.spec.test :as stest]
            [cuerdas.core :as str]
            [shared.protocols.loggable :as log]))

(defmethod create :course [{:keys [goal curator] :as query}]
  (with-meta (map->Query {:curator curator
                          :course-slug (str/slugify goal)}) {:spec ::specs/query}))