Last active
November 11, 2017 00:08
-
-
Save featheredtoast/0d10a602a14ba102689a56688a0cc2db to your computer and use it in GitHub Desktop.
some js cljs fun for data manip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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