1 # is-absolute [![NPM version](https://img.shields.io/npm/v/is-absolute.svg?style=flat)](https://www.npmjs.com/package/is-absolute) [![NPM downloads](https://img.shields.io/npm/dm/is-absolute.svg?style=flat)](https://npmjs.org/package/is-absolute) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-absolute.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-absolute)
3 > Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.
7 Install with [npm](https://www.npmjs.com/):
10 $ npm install --save is-absolute
13 Originally based on the `isAbsolute` utility method in [express](https://github.com/visionmedia/express).
18 var isAbsolute = require('is-absolute');
20 isAbsolute('a/b/c.js');
22 isAbsolute('/a/b/c.js');
26 **Explicitly test windows paths**
29 isAbsolute.posix('/foo/bar');
30 isAbsolute.posix('/user/docs/Letter.txt');
33 isAbsolute.posix('foo/bar');
37 **Explicitly test windows paths**
40 var isAbsolute = require('is-absolute');
42 isAbsolute.win32('c:\\');
43 isAbsolute.win32('//C://user\\docs\\Letter.txt');
44 isAbsolute.win32('\\\\unc\\share');
45 isAbsolute.win32('\\\\unc\\share\\foo');
46 isAbsolute.win32('\\\\unc\\share\\foo\\');
47 isAbsolute.win32('\\\\unc\\share\\foo\\bar');
48 isAbsolute.win32('\\\\unc\\share\\foo\\bar\\');
49 isAbsolute.win32('\\\\unc\\share\\foo\\bar\\baz');
52 isAbsolute.win32('a:foo/a/b/c/d');
53 isAbsolute.win32(':\\');
54 isAbsolute.win32('foo\\bar\\baz');
55 isAbsolute.win32('foo\\bar\\baz\\');
63 * [is-dotfile](https://www.npmjs.com/package/is-dotfile): Return true if a file path is (or has) a dotfile. Returns false if the… [more](https://github.com/jonschlinkert/is-dotfile) | [homepage](https://github.com/jonschlinkert/is-dotfile)
64 * [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob)
65 * [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative)
66 * [is-unc-path](https://www.npmjs.com/package/is-unc-path): Returns true if a filepath is a windows UNC file path. | [homepage](https://github.com/jonschlinkert/is-unc-path)
67 * [is-valid-glob](https://www.npmjs.com/package/is-valid-glob): Return true if a value is a valid glob pattern or patterns. | [homepage](https://github.com/jonschlinkert/is-valid-glob)
71 Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
75 | **Commits** | **Contributor**<br/> |
77 | 31 | [jonschlinkert](https://github.com/jonschlinkert) |
78 | 1 | [es128](https://github.com/es128) |
79 | 1 | [shinnn](https://github.com/shinnn) |
83 _(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
85 To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
88 $ npm install -g verb verb-generate-readme && verb
93 Install dev dependencies:
96 $ npm install -d && npm test
103 * [github/jonschlinkert](https://github.com/jonschlinkert)
104 * [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
108 Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
109 Released under the [MIT license](https://github.com/jonschlinkert/is-absolute/blob/master/LICENSE).
113 _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 16, 2016._