camel-snake-kebab icon indicating copy to clipboard operation
camel-snake-kebab copied to clipboard

A Clojure[Script] library for word case conversions

Results 17 camel-snake-kebab issues
Sort by recently updated
recently updated
newest added

When using `camel-snake-kebab` in clojurescript, running fighweel and tests at the same time i get this error: `Error refreshing environment: Syntax error compiling at (camel_snake_kebab/core.cljc:16:1).` The line specified is the...

This change allows integer keys to pass through `key-transformation` unchanged. We often process objects with integer keys and the current implementation makes use of the `name` built-in clj function, which...

Is there any way to avoid numbers creating separators? Had a quick scan of the code but couldn't see an obvious workaround. Thanks.

```clojure (camel-snake-kebab.core/->PascalCase 1) ;; => java.lang.IllegalArgumentException: No implementation of method: :alter-name of protocol: #'camel-snake-kebab.internals.alter-name/AlterName found for class: java.lang.Long ``` What do you think of an implementation that will return the...

See: ``` > camel_snake_kebab.core.__GT_kebab_case("blah:1:blah"); "blah:-1:blah" ``` is this expected?

This is for the use-case of formatting a keyword or other symbol into something which you might show to the user in a plain sentence, addressing Feature requests #74 and...

Expected `(->kebab-case-keyword :hmm.com/MonkeyFace)` => `:hmm.com/monkey-face` Actual => `monkey-face`

Converting to plain text would be useful for constructing user messages e.g. ``` (defn validate-field [object attr] (when-not (object attr) (str (csk/->plain-text attr) " is mandatory"))) (validate-field user :work-email-address) =>...

If we supply nil to a conversion function, it throws an `AssertionError` ```clojure (csk/->kebab-case-keyword nil) Execution error (AssertionError) at camel-snake-kebab.core/->kebab-case-keyword (core.cljc:21). Assert failed: (clojure.core/not (clojure.core/nil? s__20671__auto__)) (cske/transform-keys csk/->kebab-case-keyword {nil "bar"})...

for a map such as `{ 1 {:a "b"} }`, calling `transform-keys ->kebab-case-keyword` would throw an exception since it tries to symbolize the numerical key. ```(cske/transform-keys csk/->kebab-case-keyword { 1 {:a...