An open API service indexing awesome lists of open source software.

https://github.com/jonathanong/path-is

check what type of path a string is
https://github.com/jonathanong/path-is

Last synced: 5 months ago
JSON representation

check what type of path a string is

Awesome Lists containing this project

README

          

# Path Is

Check what type of path a string is according to CSS `@import` semantics,
which is most likely how all web resources will be handled.

```
var is = require('path-is')

// remote URIs
is.url('//google.com') // => true
is.absolute('/something/long') // => true
is.relative('something') // true
is.relative('./something') // true

// local URIs
is.absolute('/User/jong') // => true
is.relative('C:\\something') // => false
```