/opt/canhelp/node_modules/better-auth/dist/client/lynx
Edit: /opt/canhelp/node_modules/better-auth/dist/client/lynx/index.mjs (869B)
import { getClientConfig } from "../config.mjs";
import { createDynamicPathProxy } from "../proxy.mjs";
import { useStore } from "./lynx-store.mjs";
import { capitalizeFirstLetter } from "@better-auth/core/utils/string";
//#region src/client/lynx/index.ts
function getAtomKey(str) {
return `use${capitalizeFirstLetter(str)}`;
}
function createAuthClient(options) {
const { pluginPathMethods, pluginsActions, pluginsAtoms, $fetch, $store, atomListeners } = getClientConfig(options);
const resolvedHooks = {};
for (const [key, value] of Object.entries(pluginsAtoms)) resolvedHooks[getAtomKey(key)] = () => useStore(value);
return createDynamicPathProxy({
...pluginsActions,
...resolvedHooks,
$fetch,
$store
}, $fetch, pluginPathMethods, pluginsAtoms, atomListeners);
}
//#endregion
export { createAuthClient, useStore };
//# sourceMappingURL=index.mjs.map