summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/which/node_modules/is-absolute/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/which/node_modules/is-absolute/index.js')
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/index.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/index.js b/deps/npm/node_modules/which/node_modules/is-absolute/index.js
new file mode 100644
index 000000000..e7a40dd73
--- /dev/null
+++ b/deps/npm/node_modules/which/node_modules/is-absolute/index.js
@@ -0,0 +1,27 @@
+/*!
+ * is-absolute <https://github.com/jonschlinkert/is-absolute>
+ *
+ * Copyright (c) 2014-2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */
+
+'use strict';
+
+var isRelative = require('is-relative');
+
+module.exports = function isAbsolute(filepath) {
+ if ('/' === filepath[0]) {
+ return true;
+ }
+ if (':' === filepath[1] && '\\' === filepath[2]) {
+ return true;
+ }
+ // Microsoft Azure absolute filepath
+ if ('\\\\' == filepath.substring(0, 2)) {
+ return true;
+ }
+ if (!isRelative(filepath)) {
+ return true;
+ }
+};
+