Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More breaky.

  • Loading branch information...
commit 01828e1b7e0d6746d7b025a97d835e4e2ba0d3bd 1 parent 930fe5e
Anthony Grimes authored

Showing 2 changed files with 1 addition and 20 deletions. Show diff stats Hide diff stats

  1. +1 1  project.clj
  2. +0 19 src/refh/refheap.cljs
2  project.clj
@@ -9,4 +9,4 @@
9 9 :cljsbuild {:builds [{:source-path "src"
10 10 :compiler {:output-to "refh.js"
11 11 :target :nodejs
12   - :optimizations :advanced}}]})
  12 + :optimizations :simple}}]})
19 src/refh/refheap.cljs
... ... @@ -1,25 +1,6 @@
1 1 (ns refh.refheap
2 2 (:require [cljs.nodejs :as node]))
3 3
4   -(defn map->js [m]
5   - (let [out (js-obj)]
6   - (doseq [[k v] m]
7   - (aset out (name k) v))
8   - out))
9   -
10   -(defn clj->js
11   - "Recursively transforms ClojureScript maps into Javascript objects,
12   - other ClojureScript colls into JavaScript arrays, and ClojureScript
13   - keywords into JavaScript strings."
14   - [x]
15   - (cond
16   - (string? x) x
17   - (keyword? x) (name x)
18   - (map? x) (.-strobj (reduce (fn [m [k v]]
19   - (assoc m (clj->js k) (clj->js v))) {} x))
20   - (coll? x) (apply array (map clj->js x))
21   - :else x))
22   -
23 4 (def req (node/require "request"))
24 5
25 6 (defn request [endpoint params callback]

0 comments on commit 01828e1

Please sign in to comment.
Something went wrong with that request. Please try again.