hash-string

functionsince v0.0-2261Edit
(hash-string k)

Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn hash-string [k]
  (when (> string-hash-cache-count 255)
    (set! string-hash-cache (js-obj))
    (set! string-hash-cache-count 0))
  (if (nil? k)
    0
    (let [h (unchecked-get string-hash-cache k)]
      (if (number? h)
        h
        (add-to-string-hash-cache k)))))