Skip to content

Instantly share code, notes, and snippets.

@viebel
Last active June 10, 2016 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viebel/1fbc6e70f69ea339c0f36f84edf10859 to your computer and use it in GitHub Desktop.
Save viebel/1fbc6e70f69ea339c0f36f84edf10859 to your computer and use it in GitHub Desktop.
(extend-type object
ILookup
(-lookup
([this k]
(-lookup this k nil))
([this k not-found]
(let [k (name k)]
(if (.hasOwnProperty this k)
(aget this k)
not-found)))))
[
(:language #js {:language "clojure"})
(:format #js {:language "clojure"})
(:format #js {:language "clojure"} :edn)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment