From a221bbc93039c9ad6eba4e472dd574d77f13831b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 11 Jan 2025 16:21:46 -0400 Subject: find, reverse: use namespace import --- src/find.js | 8 ++++---- src/reverse.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/find.js b/src/find.js index 29f32dad..ec28ab15 100644 --- a/src/find.js +++ b/src/find.js @@ -5,7 +5,7 @@ import {compareObjects, stitchArrays, typeAppearance} from '#sugar'; import thingConstructors from '#things'; import {isFunction, validateArrayItems} from '#validators'; -import {findSpec, getAllSpecs, tokenProxy} from './find-reverse.js'; +import * as fr from './find-reverse.js'; function warnOrThrow(mode, message) { if (mode === 'error') { @@ -271,11 +271,11 @@ export function postprocessFindSpec(spec, {thingConstructor}) { } export function getAllFindSpecs() { - return getAllSpecs(findReverseHelperConfig); + return fr.getAllSpecs(findReverseHelperConfig); } export function findFindSpec(key) { - return findSpec(key, findReverseHelperConfig); + return fr.findSpec(key, findReverseHelperConfig); } export const findTokenKey = Symbol.for('find.findTokenKey'); @@ -394,7 +394,7 @@ export function findMixed(config) { return findMixedStore.get(config); } -export default tokenProxy({ +export default fr.tokenProxy({ findSpec: findFindSpec, prepareBehavior: findHelper, diff --git a/src/reverse.js b/src/reverse.js index b5a4bf4c..0f235369 100644 --- a/src/reverse.js +++ b/src/reverse.js @@ -1,4 +1,4 @@ -import {findSpec, getAllSpecs, tokenProxy} from './find-reverse.js'; +import * as fr from './find-reverse.js'; const hardcodedReverseSpecs = {}; @@ -19,14 +19,14 @@ export function postprocessReverseSpec(spec, {thingConstructor}) { } export function getAllReverseSpecs() { - return getAllSpecs(findReverseHelperConfig); + return fr.getAllSpecs(findReverseHelperConfig); } export function findReverseSpec(key) { - return findSpec(key, findReverseHelperConfig); + return fr.findSpec(key, findReverseHelperConfig); } -export default tokenProxy({ +export default fr.tokenProxy({ findSpec: findReverseSpec, prepareBehavior: spec => from => ({spec, from}), }); -- cgit 1.3.0-6-gf8a5