Permalink
Browse files

More breaky.

  • Loading branch information...
1 parent 930fe5e commit 01828e1b7e0d6746d7b025a97d835e4e2ba0d3bd @Raynes committed Aug 12, 2012
Showing with 1 addition and 20 deletions.
  1. +1 −1 project.clj
  2. +0 −19 src/refh/refheap.cljs
View
2 project.clj
@@ -9,4 +9,4 @@
:cljsbuild {:builds [{:source-path "src"
:compiler {:output-to "refh.js"
:target :nodejs
- :optimizations :advanced}}]})
+ :optimizations :simple}}]})
View
19 src/refh/refheap.cljs
@@ -1,25 +1,6 @@
(ns refh.refheap
(:require [cljs.nodejs :as node]))
-(defn map->js [m]
- (let [out (js-obj)]
- (doseq [[k v] m]
- (aset out (name k) v))
- out))
-
-(defn clj->js
- "Recursively transforms ClojureScript maps into Javascript objects,
- other ClojureScript colls into JavaScript arrays, and ClojureScript
- keywords into JavaScript strings."
- [x]
- (cond
- (string? x) x
- (keyword? x) (name x)
- (map? x) (.-strobj (reduce (fn [m [k v]]
- (assoc m (clj->js k) (clj->js v))) {} x))
- (coll? x) (apply array (map clj->js x))
- :else x))
-
(def req (node/require "request"))
(defn request [endpoint params callback]

0 comments on commit 01828e1

Please sign in to comment.