0.1.0 • Published 10 years ago

isabspath v0.1.0

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

node-isabspath

Return true if path is an absolute pathname. On Unix, that means it begins with a slash, on Windows that it begins with a (back)slash after chopping off a potential drive letter.

Usage

var isabspath = require('isabspath')
isabspath('/root/path/to') // => true
isabspath('C:\\path\\to')  // => true
isabspath('C:/path/to')    // => true
isabspath('.')             // => false
isabspath('./path/to')     // => false