      :cljs (let [match (->Match data nil)]
              (reify Matcher
                (match [_ i max path]
-                 (if (< i max)
-                   (-assoc! match key (decode! path i max))))
+                 (if (< i max) (-assoc! match key (decode! path i max true))))
                (view [_] [key [data]])
                (depth [_] 1)))))
 

     :cljs (reify Matcher
             (match [_ i max path]
               (if (and (< i max) (not= (get path i) \/))
                 (loop [percent? false, plus? false, j i]
                   (if (= max j)
                     (if-let [match (match matcher max max path)]
                       (-assoc! match key (decode! path i max percent? plus?)))
                     (let [c ^char (get path j)]
                       (case c
                         \/ (if-let [match (match matcher j max path)]
                              (-assoc! match key (decode! path i j percent? plus?)))
                         \% (recur true plus? (inc j))
                         \+ (recur percent? true (inc j))
                         (recur percent? plus? (inc j))))))))
             (view [_] [key (view matcher)])
             (depth [_] (inc (depth matcher))))))


          (update :children dissoc ""))
      node')))

#?(:cljs
   (defn decode! [path start end percent?]
     (let [path (subs path start end)]
       (if percent? (js/decodeURIComponent path) path))))

(defn data-matcher [data]
  #?(:clj  (Trie/dataMatcher data)
