Skip to content

Instantly share code, notes, and snippets.

@featheredtoast
Last active November 11, 2017 00:08
Show Gist options
  • Select an option

  • Save featheredtoast/0d10a602a14ba102689a56688a0cc2db to your computer and use it in GitHub Desktop.

Select an option

Save featheredtoast/0d10a602a14ba102689a56688a0cc2db to your computer and use it in GitHub Desktop.
some js cljs fun for data manip
(defn ^:export marshall-object [perms]
(->>
(js->clj perms)
(map (juxt (fn [p] (get-in p ["modules" 0])) (fn [p] [(identity p)])))
(map (partial apply hash-map))
(apply merge-with into)
(clj->js)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment