How to use the url.isAbsolute function in url

To help you get started, we’ve selected a few url examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github component / url / test / tests.js View on Github external
it('should support relative', function(){
    assert(false === url.isAbsolute('foo'));
    assert(false === url.isAbsolute('foo/bar/baz'));
    assert(false === url.isAbsolute('/foo/bar/baz'));
    assert(false === url.isAbsolute('foo.com/something'));
  })
})
github component / url / test / tests.js View on Github external
it('should support relative', function(){
    assert(false === url.isAbsolute('foo'));
    assert(false === url.isAbsolute('foo/bar/baz'));
    assert(false === url.isAbsolute('/foo/bar/baz'));
    assert(false === url.isAbsolute('foo.com/something'));
  })
})
github component / url / test / tests.js View on Github external
it('should support scheme://', function(){
    assert(true === url.isAbsolute('http://foo.com'));
  })
github component / url / test / tests.js View on Github external
it('should support relative', function(){
    assert(false === url.isAbsolute('foo'));
    assert(false === url.isAbsolute('foo/bar/baz'));
    assert(false === url.isAbsolute('/foo/bar/baz'));
    assert(false === url.isAbsolute('foo.com/something'));
  })
})
github component / url / test / tests.js View on Github external
it('should support //', function(){
    assert(true === url.isAbsolute('//foo.com'));
  })
github component / url / test / tests.js View on Github external
it('should support relative', function(){
    assert(false === url.isAbsolute('foo'));
    assert(false === url.isAbsolute('foo/bar/baz'));
    assert(false === url.isAbsolute('/foo/bar/baz'));
    assert(false === url.isAbsolute('foo.com/something'));
  })
})
github component / live-css / index.js View on Github external
each(links, function(link){
    if ('stylesheet' != link.getAttribute('rel')) return;
    if (url.isAbsolute(link.getAttribute('href'))) return;
    styles.push(link);
  });