0.1.1 • Published 9 years ago

github-page-type v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 years ago

github-page-type

NPM version Build Status

Returns a page type for the given github url.

Install

$ npm install --save github-page-type

Usage

githubPageType('https://github.com/github-linker');
// => USER_ORGANIZATION_PROFILE

githubPageType('https://github.com/blog');
// => BLOG

githubPageType('https://github.com/github-linker/core');
// => REPOSITORY

githubPageType('https://github.com/blog', githubPageType.BLOG);
// => true

githubPageType('https://github.com/blog', [githubPageType.USER_ORGANIZATION_PROFILE]);
// => false

Available types

TypeSample
HOMEhttps://github.com
EXPLOREhttps://github.com/explore
NOTIFICATIONShttps://github.com/notifications
SHOWCASEShttps://github.com/showcases
STARShttps://github.com/stars
TRENDINGhttps://github.com/trending
WATCHINGhttps://github.com/watching
SEARCHhttps://github.com/search
ABOUThttps://github.com/about
CONTACThttps://github.com/contact
FEATUREShttps://github.com/features
SETTINGS_ADMINhttps://github.com/settings/admin
SETTINGS_APPLICATIONShttps://github.com/settings/applications
SETTINGS_BILLINGhttps://github.com/settings/billing
SETTINGS_EMAILShttps://github.com/settings/emails
SETTINGS_NOTIFICATIONShttps://github.com/settings/notifications
SETTINGS_ORGANIZATIONShttps://github.com/settings/organizations
SETTINGS_PROFILEhttps://github.com/settings/profile
SETTINGS_REPOSITORIEShttps://github.com/settings/repositories
SETTINGS_SECURITYhttps://github.com/settings/security
SETTINGS_SSHhttps://github.com/settings/ssh
BLOGhttps://github.com/blog
USER_ORGANIZATION_PROFILEhttps://github.com/user
REPOSITORYhttps://github.com/user/repo
REPOSITORY_BLOBhttps://github.com/user/repo/blob/master/file
REPOSITORY_TREEhttps://github.com/user/repo/tree/master/folder
REPOSITORY_COMMIThttps://github.com/user/repo/commit/4a30c6606465e294d1ae1c9ca394ba03368928f7
REPOSITORY_COMMITShttps://github.com/user/repo/commits/master
REPOSITORY_SEARCHhttps://github.com/user/repo/search
REPOSITORY_ISSUEShttps://github.com/user/repo/issues
REPOSITORY_ISSUEhttps://github.com/user/repo/issues/123
REPOSITORY_PULLShttps://github.com/user/repo/pulls
REPOSITORY_PULL_CONVERSATIONhttps://github.com/user/repo/pull/123
REPOSITORY_PULL_COMMITShttps://github.com/user/repo/pull/123/commits
REPOSITORY_PULL_FILEShttps://github.com/user/repo/pull/123/files
REPOSITORY_COMPAREhttps://github.com/user/repo/compare/master...dev
REPOSITORY_COMPARE_OVERVIEWhttps://github.com/user/repo/compare

License

Copyright (c) 2015 Stefan Buck. Licensed under the MIT license.

0.1.1

9 years ago

0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago