Login
OneManager
Home
/
Bethel
/
tmp
/
october-report-20261021
/
node_modules
/
path-is-absolute
File
OriginalPic
Thumbnails
CopyAllDownloadUrl
EditTime
Size
index.js
2026-10-21 07:16:33
611 B
license
2026-10-21 07:16:21
1.09 KB
package.json
2026-10-21 07:16:33
733 B
readme.md
2026-10-21 07:16:33
1.13 KB
# path-is-absolute [](https://travis-ci.org/sindresorhus/path-is-absolute) > Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) ## Install ``` $ npm install --save path-is-absolute ``` ## Usage ```js const pathIsAbsolute = require('path-is-absolute'); // Running on Linux pathIsAbsolute('/home/foo'); //=> true pathIsAbsolute('C:/Users/foo'); //=> false // Running on Windows pathIsAbsolute('C:/Users/foo'); //=> true pathIsAbsolute('/home/foo'); //=> false // Running on any OS pathIsAbsolute.posix('/home/foo'); //=> true pathIsAbsolute.posix('C:/Users/foo'); //=> false pathIsAbsolute.win32('C:/Users/foo'); //=> true pathIsAbsolute.win32('/home/foo'); //=> false ``` ## API See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). ### pathIsAbsolute(path) ### pathIsAbsolute.posix(path) POSIX specific version. ### pathIsAbsolute.win32(path) Windows specific version. ## License MIT © [Sindre Sorhus](https://sindresorhus.com)
Close
2026-10-29 08:07:28 Thursday 216.73.216.30 Runningtime:0.671s Mem:406.14 KB