Socket
Book a DemoInstallSign in
Socket

github-url-exists

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-url-exists

Check if a URL is a valid and existent GitHub HTTP(s) URL

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

github-url-exists Build Status

Check if a URL is a valid and existent GitHub HTTP(s) URL

Installation

$ npm install --save github-url-exists

Usage

var githubUrlExists = require('github-url-exists');

githubUrlExists('https://github.com/alferov/awesome-gulp', function(err, valid) {
  if (err) {
    // Handle errors
  }

  console.log(valid); // => true
});

githubUrlExists('https://github.com/alferov/awesome-gulp.git', function(err, valid) {
  if (err) {
    // Handle errors
  }

  console.log(valid); // => true
});

githubUrlExists('https://github.com/notthepage/notthepage', function(err, valid) {
  if (err) {
    // Handle errors
  }

  console.log(valid); // => false
});

githubUrlExists('google.com/', function(err, valid) {
  if (err) {
    // Handle errors
  }

  console.log(valid); // => false
});

//Warning: The package doesn't support ssh protocol
githubUrlExists('git@github.com:alferov/awesome-gulp.git', function(err, valid) {
  if (err) {
    // Handle errors
  }

  console.log(valid); // => false
});

API

githubUrlExists(url, cb)

Check if a URL is a valid and existent GitHub HTTP(s) URL

Params

  • String url: A string to be validated
  • Function cb: The callback function

License

MIT © Philipp Alferov

Keywords

git

FAQs

Package last updated on 06 Nov 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.