判断文件路径相关,来源于seajs的源码

function isRelative(id){
     return id.indexOf('./') === 0 || id.indexOf('../') === 0;
}
function isAbsolute(id){
     return id.indexOf('://') > 0 || id.indexOf('//') === 0;
}
function isRoot(id){
     return id.charAt(0) === '/' && id.charAt(1) !== '/';
}
function isTopLevel(id){
    var c = id.charAt(0);
    return id.indexOf('://') === -1 && c !== '.' && c!== '/';
}