title: Determine if a path is relative or absolute in Javascript
body: <p>Is there a good a method out there that will check to see if a string is a relative path</p>
  
  <p>Examples:</p>
  
  <blockquote>
    <p>path = "/absolute/path/to";</p>
    
    <p>path = "relative/path/to"</p>
    
    <p>path = "<a href="http://www.absolutePathAsWellWithoutTrailingSlash.com" rel="nofollow">http://www.absolutePathAsWellWithoutTrailingSlash.com</a>"</p>
    
    <p>path = "file:///www.absolutePathAsWellWithoutTrailingSlash.com"</p>
  </blockquote>
  
  <p>You can see that checking just for a start slash won't do, to determine if it is absolute or relative. </p>
  
  <p>Is there a good method for this out there, or should I write it myself?</p>