1.0.7 • Published 9 years ago

github-url-exists v1.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago