Skip to content

Can string/keyword harvesting be parameterized? #99

Open
@raystubbs

Description

@raystubbs

Any chance these can be parameterized?

; girouette.processor:88-95
(defn- string->classes [s]
  (->> (str/split s #"\s+")
       (remove str/blank?)))

(defn- kw->classes [kw]
  (->> (name kw)
       (re-seq #"\.[^\.#]+")
       (map (fn [s] (subs s 1)))))

I'd prefer to use keywords over strings for conditional classes (e.g :class (if something [:class-1 :class-2] [:class-3])). Not a deal breaker, this project is awesome! But this would make it that much more awesome, I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions