Socket
Book a DemoInstallSign in
Socket

github-page-type

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-page-type

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 09 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts