Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jul 24, 2022
1 parent a329ff7 commit 54d4ea9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ addTests('isBranches', [
// Use this with a clean pathname, without leading `/gist/`
const doesLookLikeAProfile = (string: string | undefined): boolean =>
typeof string === 'string'
&& string.length > 0
&& !string.includes('/')
&& !string.includes('.')
&& string.length > 0 // Isn't root (http://github.com/)
&& !string.includes('/') // Single-level
&& !string.includes('.') // No extensions
&& !reservedNames.includes(string);

export const isProfile = (url: URL | HTMLAnchorElement | Location = location): boolean =>
Expand Down

0 comments on commit 54d4ea9

Please sign in to comment.