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
- Host: GitHub
- URL: https://github.com/jonathanong/path-is
- Owner: jonathanong
- License: mit
- Created: 2014-04-27T03:53:52.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-07T23:41:43.000Z (about 12 years ago)
- Last Synced: 2025-01-30T15:40:37.430Z (over 1 year ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```