Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More breaky.

  • Loading branch information...
commit 01828e1b7e0d6746d7b025a97d835e4e2ba0d3bd 1 parent 930fe5e
Anthony Grimes authored
Showing with 1 addition and 20 deletions.
  1. +1 −1  project.clj
  2. +0 −19 src/refh/refheap.cljs
2  project.clj
View
@@ -9,4 +9,4 @@
:cljsbuild {:builds [{:source-path "src"
:compiler {:output-to "refh.js"
:target :nodejs
- :optimizations :advanced}}]})
+ :optimizations :simple}}]})
19 src/refh/refheap.cljs
View
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.