package
Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.
npm install is-absoluteGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native
path.isAbolute.
Install with npm:
$ npm install --save is-absoluteOriginally based on the isAbsolute utility method in express.
var isAbsolute = require('is-absolute');
isAbsolute('a/b/c.js');
//=> 'false'
isAbsolute('/a/b/c.js');
//=> 'true'Explicitly test windows paths
isAbsolute.posix('/foo/bar');
isAbsolute.posix('/user/docs/Letter.txt');
//=> true
isAbsolute.posix('foo/bar');
//=> falseExplicitly test windows paths
var isAbsolute = require('is-absolute');
isAbsolute.win32('c:\\');
isAbsolute.win32('//C://user\\docs\\Letter.txt');
isAbsolute.win32('\\\\unc\\share');
isAbsolute.win32('\\\\unc\\share\\foo');
isAbsolute.win32('\\\\unc\\share\\foo\\');
isAbsolute.win32('\\\\unc\\share
true if the given string looks like a glob pattern or an extglob pattern… more | Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
| Commits | Contributor |
|---|---|
| 35 | jonschlinkert |
| 1 | es128 |
| 1 | shinnn |
| 1 |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verbRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm testJon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on July 13, 2017.
jonschlinkert
github@sellside.com
true if the path appears to be relative. | homepageEstimated unpacked size across 5 packages.
7.8 kB
Includes dependencies.