aboutsummaryrefslogtreecommitdiff
path: root/_mint/node_modules/path-is-absolute
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2021-12-21 15:25:09 +0100
committerMinteck <contact@minteck.org>2021-12-21 15:25:09 +0100
commite703e51c9c09b22e3bcda9a1faf1e05897f60616 (patch)
tree4fd67a209ad6988fbf569d7dff8bc37ba45baf95 /_mint/node_modules/path-is-absolute
downloadmint-e703e51c9c09b22e3bcda9a1faf1e05897f60616.tar.gz
mint-e703e51c9c09b22e3bcda9a1faf1e05897f60616.tar.bz2
mint-e703e51c9c09b22e3bcda9a1faf1e05897f60616.zip
Initial commit
Diffstat (limited to '_mint/node_modules/path-is-absolute')
-rw-r--r--_mint/node_modules/path-is-absolute/index.js20
-rw-r--r--_mint/node_modules/path-is-absolute/license21
-rw-r--r--_mint/node_modules/path-is-absolute/package.json43
-rw-r--r--_mint/node_modules/path-is-absolute/readme.md59
4 files changed, 143 insertions, 0 deletions
diff --git a/_mint/node_modules/path-is-absolute/index.js b/_mint/node_modules/path-is-absolute/index.js
new file mode 100644
index 0000000..22aa6c3
--- /dev/null
+++ b/_mint/node_modules/path-is-absolute/index.js
@@ -0,0 +1,20 @@
+'use strict';
+
+function posix(path) {
+ return path.charAt(0) === '/';
+}
+
+function win32(path) {
+ // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+ var result = splitDeviceRe.exec(path);
+ var device = result[1] || '';
+ var isUnc = Boolean(device && device.charAt(1) !== ':');
+
+ // UNC paths are always absolute
+ return Boolean(result[2] || isUnc);
+}
+
+module.exports = process.platform === 'win32' ? win32 : posix;
+module.exports.posix = posix;
+module.exports.win32 = win32;
diff --git a/_mint/node_modules/path-is-absolute/license b/_mint/node_modules/path-is-absolute/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/_mint/node_modules/path-is-absolute/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/_mint/node_modules/path-is-absolute/package.json b/_mint/node_modules/path-is-absolute/package.json
new file mode 100644
index 0000000..91196d5
--- /dev/null
+++ b/_mint/node_modules/path-is-absolute/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "path-is-absolute",
+ "version": "1.0.1",
+ "description": "Node.js 0.12 path.isAbsolute() ponyfill",
+ "license": "MIT",
+ "repository": "sindresorhus/path-is-absolute",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "xo && node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "paths",
+ "file",
+ "dir",
+ "absolute",
+ "isabsolute",
+ "is-absolute",
+ "built-in",
+ "util",
+ "utils",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "is",
+ "detect",
+ "check"
+ ],
+ "devDependencies": {
+ "xo": "^0.16.0"
+ }
+}
diff --git a/_mint/node_modules/path-is-absolute/readme.md b/_mint/node_modules/path-is-absolute/readme.md
new file mode 100644
index 0000000..8dbdf5f
--- /dev/null
+++ b/_mint/node_modules/path-is-absolute/readme.md
@@ -0,0 +1,59 @@
+# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](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)