diff --git a/src/utils.lisp b/src/utils.lisp index b5361a1..4c3b553 100644 --- a/src/utils.lisp +++ b/src/utils.lisp @@ -14,7 +14,9 @@ #:get-alert #:get-and-reset-alert #:bool-to-checkbox - #:checkbox-to-bool) + #:checkbox-to-bool + #:asciify + #:slugify) (:documentation "Utilities that do not depend on models.")) (in-package #:utils) @@ -22,6 +24,10 @@ (defun asciify (string) (str:downcase (slug:asciify string))) +(defun slugify (string) + "Turns a string of text into a slug." + (str:downcase (slug:slugify string))) + (defun request-params (request) (loop :for (key . value) :in request :collect (let ((*package* (find-package :keyword)))