UNPKG

@nerdlat/auth

Version:

Authentication library similar to Clerk for React and Express applications

10 lines (9 loc) 289 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.apiRequest = apiRequest; async function apiRequest(url, options = {}) { const res = await fetch(url, options); if (!res.ok) throw new Error('API request failed'); return res.json(); }