UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

23 lines • 1.2 kB
//#region src/app/utils.d.ts /** Whether a URL string is a path rooted at the current origin, so carries no protocol. */ export declare function isRootedPath(value: string): boolean; /** Whether a URL string carries its own protocol or authority. */ export declare function isAbsoluteHref(value: string): boolean; /** The script-capable protocol a URL string would navigate to, or `null` when it is safe. */ export declare function getScriptProtocol(value: string): string | null; /** Returns the value unchanged when safe to use as an anchor `href`, or `null`. */ export declare function sanitizeAnchorHref(value: string): string | null; /** @since 3.9.0 */ export declare function toArray<T>(value: T | T[]): T[]; export type ArrayItems<T> = NonNullable<T> extends readonly (infer U)[] ? U : NonNullable<T>; export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; export declare function isBotUserAgent(userAgent: string): boolean; type Trace = { source: string; line?: number; column?: number; }; export declare function getUserTrace(): Trace[]; export declare function getUserCaller(): Trace | null; //#endregion export {};