How to use shorten-repo-url - 2 common examples

To help you get started, we’ve selected a few shorten-repo-url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / refined-github / source / features / shorten-links.tsx View on Github external
function init(): void {
	for (const a of select.all(`a[href]:not(.${linkifiedURLClass})`)) {
		applyToLink(a, location.href);
	}
}
github sindresorhus / refined-github / source / options.tsx View on Github external
function parseDescription(description: string): DocumentFragment {
	const descriptionElement = <span>{description}</span>;
	domFormatters.linkifyIssues(descriptionElement, {
		baseUrl: 'https://github.com',
		user: 'sindresorhus',
		repository: 'refined-github'
	});
	domFormatters.linkifyURLs(descriptionElement);
	domFormatters.parseBackticks(descriptionElement);

	for (const a of select.all('a', descriptionElement)) {
		applyToLink(a);
	}

	return descriptionElement;
}

shorten-repo-url

Shorten GitHub URLs like GitHub shortens Issues and Commit URLs

MIT
Latest version published 8 months ago

Package Health Score

65 / 100
Full package analysis

Popular shorten-repo-url functions