Liking cljdoc? Tell your friends :D

hara.function.base.hook


+originalclj

(+original ??)
?? invalid arglists:
()

cache for storing original functions which have been patched

cache for storing original functions which have been patched
raw docstring

list-patchedclj

(list-patched)

returns all functions that have been patched

(patch #'hara.core.base.check/double? hara.core.base.check/double?)

(-> (list-patched) (get #'hara.core.base.check/double?) boolean) => true

returns all functions that have been patched

(patch #'hara.core.base.check/double?
       hara.core.base.check/double?)

(-> (list-patched)
    (get #'hara.core.base.check/double?)
    boolean)
=> true
raw docstring

patchclj

(patch var f)

patches the existing function with a given one

(patch #'hara.core.base.check/double? (fn [x] (instance? Float x)))

(hara.core.base.check/double? (float 1.0)) => true

patches the existing function with a given one

(patch #'hara.core.base.check/double?
       (fn [x]
         (instance? Float x)))

(hara.core.base.check/double? (float 1.0))
=> true
raw docstring

patched?clj

(patched? var)

checks if an existing function has been patched

(patched? #'hara.core.base.check/double?) => true

checks if an existing function has been patched

(patched? #'hara.core.base.check/double?)
=> true
raw docstring

unpatchclj

(unpatch var)

removes the patch creates for the var

(unpatch #'hara.core.base.check/double?)

(hara.core.base.check/double? (float 1.0)) => false

removes the patch creates for the var

(unpatch #'hara.core.base.check/double?)

(hara.core.base.check/double? (float 1.0))
=> false
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close