I sent a PR to a repo the other day and want to make sure I have the right idea for URI validation.function validateURI(files) {    //...    // files can be either a string or an array of paths    // validates the relative path exists or is an http(s) URI    // returns a filtered list of valid paths    // (e.g.) [../dne.js, //cdn.jsdelivr.net/jquery/2.1.0/jquery.min.js] => [//cdn.jsdelivr.net/jquery/2.1.0/jquery.min.js]    if(typeof files !== object) files = [files]; //wrap string    var local = grunt.file.expand(opt, files),        remote = _.map(files, path.normalize).filter(function(path) { //for loading from cdn            return /^((http|https):)?(\\|\/\/)/.test(path); //is http, https, or //        });    return _.uniq(local.concat(remote));}
Validate that a relative path exists or is an external URI
javascript;node.js;grunt.js