Skip to content

Commit f1ed5f1

Browse files
authored
Add isRepoWiki (#64)
1 parent ac26eec commit f1ed5f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@ collect.set('isRepoTree', [
385385
'https://github.com/sindresorhus/refined-github/tree/57bf435ee12d14b482df0bbd88013a2814c7512e/distribution',
386386
]);
387387

388+
export const isRepoWiki = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getRepo(url)?.path.startsWith('wiki'));
389+
collect.set('isRepoWiki', [
390+
'https://github.com/lukesampson/scoop/wiki',
391+
]);
392+
388393
export const isSingleCommit = (url: URL | HTMLAnchorElement | Location = location): boolean => /^commit\/[\da-f]{5,40}/.test(getRepo(url)?.path!);
389394
collect.set('isSingleCommit', [
390395
'https://github.com/sindresorhus/refined-github/commit/5b614b9035f2035b839f48b4db7bd5c3298d526f',

0 commit comments

Comments
 (0)