UNPKG

@clerk/nextjs

Version:

Clerk SDK for NextJS

20 lines 874 B
import "../chunk-BUSYA2B4.js"; var _a, _b, _c, _d, _e, _f; import nextPkg from "next/package.json"; function meetsNextMinimumVersion(minimumMajorVersion) { var _a2; if (!((_a2 = nextPkg) == null ? void 0 : _a2.version)) { return false; } const majorVersion = parseInt(nextPkg.version.split(".")[0], 10); return !isNaN(majorVersion) && majorVersion >= minimumMajorVersion; } const isNext13 = (_c = (_b = (_a = nextPkg) == null ? void 0 : _a.version) == null ? void 0 : _b.startsWith("13.")) != null ? _c : false; const isNextWithUnstableServerActions = isNext13 || ((_f = (_e = (_d = nextPkg) == null ? void 0 : _d.version) == null ? void 0 : _e.startsWith("14.0")) != null ? _f : false); const isNext16OrHigher = meetsNextMinimumVersion(16); export { isNext13, isNext16OrHigher, isNextWithUnstableServerActions }; //# sourceMappingURL=sdk-versions.js.map