File size: 244 Bytes
a5f860b
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
var REMOTE_RESOURCE_PATTERN = /^(\w+:\/\/|\/\/)/;
var FILE_RESOURCE_PATTERN = /^file:\/\//;

function isRemoteResource(uri) {
  return REMOTE_RESOURCE_PATTERN.test(uri) && !FILE_RESOURCE_PATTERN.test(uri);
}

module.exports = isRemoteResource;