diff options
Diffstat (limited to 'emacs.d/wpc/casing.el')
-rw-r--r-- | emacs.d/wpc/casing.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/emacs.d/wpc/casing.el b/emacs.d/wpc/casing.el index 0592d9dddb08..598833a9f6c5 100644 --- a/emacs.d/wpc/casing.el +++ b/emacs.d/wpc/casing.el @@ -25,6 +25,16 @@ s-upcase (s-replace "-" "_"))) +(defun lower->caps (x) + "Change the casing of X from lowercase to CAPS_CASE." + (->> x + s-upcase + (s-replace " " "_"))) + +(defun lower->kebab (x) + "Change the casing of X from lowercase to kebab-case" + (s-replace " " "-" x)) + ;;; Tests: (ert-deftest caps->kebab-test () |