Skip to content

Commit

Permalink
Initial version of extend-object. Works.
Browse files Browse the repository at this point in the history
  • Loading branch information
fogus committed Sep 16, 2011
1 parent db46aae commit 63462a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cljs/cljs/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3220,4 +3220,7 @@ reduces them without incurring seq initialization"
(defn extend-object
""
[obj fn-map]
)
(doseq [[key-name f] fn-map]
(let [str-name (name key-name)
bind-fn (goog.bind f obj)]
(js* "~{obj}[~{str-name}] = ~{bind-fn}"))))

0 comments on commit 63462a3

Please sign in to comment.