« get me outta code hell

find: move decorate-token behavior into find-reverse - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/find-reverse.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-01-11 16:23:34 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-01-11 16:23:34 -0400
commit3cc050187760c758c4760121281ff9a7e0b626f5 (patch)
tree63ee2707e95fe0b5e7045337560d1b049b3c0253 /src/find-reverse.js
parenta221bbc93039c9ad6eba4e472dd574d77f13831b (diff)
find: move decorate-token behavior into find-reverse
Diffstat (limited to 'src/find-reverse.js')
-rw-r--r--src/find-reverse.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/find-reverse.js b/src/find-reverse.js
index 47e0e268..5f8e2100 100644
--- a/src/find-reverse.js
+++ b/src/find-reverse.js
@@ -69,9 +69,6 @@ export function tokenProxy({
 
   handle: customHandle =
     (_key) => undefined,
-
-  decorate =
-    (_token, _key) => {},
 }) {
   return new Proxy({}, {
     get: (store, key) => {
@@ -91,10 +88,12 @@ export function tokenProxy({
         };
 
         store[key] = (...args) => behavior(...args);
-        decorate(store[key], key);
+        store[key][tokenKey] = key;
       }
 
       return store[key];
     },
-    });
+  });
 }
+
+export const tokenKey = Symbol.for('find.tokenKey');