cljs.test/js-line-and-column

functionsince v0.0-2496Edit
(js-line-and-column stack-element)

Source code @ clojurescript:src/main/cljs/cljs/test.cljs
(defn js-line-and-column [stack-element]
  "Returns a 2-element vector containing the line and
  column encoded at the end of a stack element string.
  A line or column will be represented as NaN if not
  parsesable."
  (let [parts (.split stack-element ":")
        cnt   (count parts)]
    (if (> cnt 1)
      [(js/parseInt (nth parts (- cnt 2)) 10)
       (js/parseInt (nth parts (dec cnt)) 10)]
      [##NaN ##NaN])))