Website Structure

This commit is contained in:
supalerk-ar66 2026-01-13 10:46:40 +07:00
parent 62812f2090
commit 71f0676a62
22365 changed files with 4265753 additions and 791 deletions

34
Frontend-Learner/node_modules/nuxt/dist/app/utils.js generated vendored Normal file
View file

@ -0,0 +1,34 @@
import { captureStackTrace } from "errx";
export function toArray(value) {
return Array.isArray(value) ? value : [value];
}
const distURL = import.meta.url.replace(/\/app\/.*$/, "/");
export function getUserTrace() {
if (!import.meta.dev) {
return [];
}
const trace = captureStackTrace();
const start = trace.findIndex((entry) => !entry.source.startsWith(distURL));
const end = [...trace].reverse().findIndex((entry) => !entry.source.includes("node_modules") && !entry.source.startsWith(distURL));
if (start === -1 || end === -1) {
return [];
}
return trace.slice(start, -end).map((i) => ({
...i,
source: i.source.replace(/^file:\/\//, "")
}));
}
export function getUserCaller() {
if (!import.meta.dev) {
return null;
}
const { source, line, column } = captureStackTrace().find((entry) => !entry.source.startsWith(distURL)) ?? {};
if (!source) {
return null;
}
return {
source: source.replace(/^file:\/\//, ""),
line,
column
};
}