npm.io
0.1.0 • Published 12 years ago

isabspath

Licence
Version
0.1.0
Deps
0
Vulns
0
Weekly
0
Stars
3

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

Keywords