source: trip-planner-front/node_modules/path-is-absolute/readme.md@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[6a3a178]1# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute)
2
3> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
4
5
6## Install
7
8```
9$ npm install --save path-is-absolute
10```
11
12
13## Usage
14
15```js
16const pathIsAbsolute = require('path-is-absolute');
17
18// Running on Linux
19pathIsAbsolute('/home/foo');
20//=> true
21pathIsAbsolute('C:/Users/foo');
22//=> false
23
24// Running on Windows
25pathIsAbsolute('C:/Users/foo');
26//=> true
27pathIsAbsolute('/home/foo');
28//=> false
29
30// Running on any OS
31pathIsAbsolute.posix('/home/foo');
32//=> true
33pathIsAbsolute.posix('C:/Users/foo');
34//=> false
35pathIsAbsolute.win32('C:/Users/foo');
36//=> true
37pathIsAbsolute.win32('/home/foo');
38//=> false
39```
40
41
42## API
43
44See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path).
45
46### pathIsAbsolute(path)
47
48### pathIsAbsolute.posix(path)
49
50POSIX specific version.
51
52### pathIsAbsolute.win32(path)
53
54Windows specific version.
55
56
57## License
58
59MIT © [Sindre Sorhus](https://sindresorhus.com)
Note: See TracBrowser for help on using the repository browser.