@limetech/lime-elements
Version:
33 lines • 957 B
TypeScript
/**
*
* @param value
*/
export declare function getHref(value: string): string;
/**
*
* @param value
*/
export declare function getTarget(value: string): "_self" | "_blank";
/**
*
* @param input
*/
export declare function prependProtocol(input: string): string;
/**
*
* @param input
*/
export declare function hasKnownProtocol(input: string): boolean;
/**
* Returns the appropriate `rel` attribute value for a link.
*
* If an explicit `rel` value is provided, it will be used.
* Otherwise, when `target` is `_blank`, automatically returns
* `"noopener noreferrer"` for improved security.
*
* @param target - The target attribute value (e.g., "_blank", "_self")
* @param explicitRel - An explicitly provided rel attribute value
* @returns The rel attribute value to use, or undefined if none needed
*/
export declare function getRel(target?: string | null, explicitRel?: string | null): string;
//# sourceMappingURL=link-helper.d.ts.map