cfpb / node-wcag

WCAG and Section 508 accessibility audits from the command line.
Creative Commons Zero v1.0 Universal
31 stars 8 forks source link

Check if supplied URL is valid #18

Closed zrrrzzt closed 9 years ago

zrrrzzt commented 9 years ago

Use the valid-url module

var validUrl = require('valid-url')

if (opts.uri && !validUrl.isWebUri(opts.uri)) {
    return callback(new Error('You supplied an invalid URL.'), null);
}
zrrrzzt commented 9 years ago

Closed by PR #19