Skip to content

Instantly share code, notes, and snippets.

awkay / routing-helpers.cljc
Created Aug 12, 2021
Some functions for working with Fulcro dynamic routers. I'll probably put some version of these once they're refined into Fulcro itself, but for now there are here for reference.
View routing-helpers.cljc
(defn- get-ast-children [query-ast at-depth]
(let [{:keys [children] :as node} query-ast]
(and (zero? at-depth) (seq children)) children
(zero? at-depth) node
:else (let [sub-children (mapcat :children children)]
(get-ast-children {:type :root
:children sub-children} (dec at-depth))))))
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
package com.openedgepay.settings;
public enum ResultCode {
APPROVED("Transaction approved."),
View macro_fun.cljc
(ns sample.macro-fun)
(defn some-xform [body] (reverse body)))
(defn bump-numbers [body]
(map #(if (number? %) (+ 1 %) %) body)))
View LinkJoins.cljs
(ns om-tutorial.core
(:require [goog.dom :as gdom]
[ :as om :refer-macros [defui]]
[cljs.pprint :refer [pprint]]
[om.dom :as dom]))
(def init-data
{:current-user {:email "" :things [[:thing/by-id 1] [:thing/by-id 2]]}
View gist:7883750
a: 1,
dt: '2012-11-01',
arr: [ 1,2,3 ]