Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function encloseURI (uri: string, always?: boolean): string {
if (
always ||
!uri.length ||
EXPRESSIONS_WHITE_SPACE.test(uri) ||
ccount(uri, '(') !== ccount(uri, ')')
) {
return `<${uri}>`
}
return uri
};