From 3cc050187760c758c4760121281ff9a7e0b626f5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 11 Jan 2025 16:23:34 -0400 Subject: find: move decorate-token behavior into find-reverse --- src/find-reverse.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/find-reverse.js') 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'); -- cgit 1.3.0-6-gf8a5