aboutsummaryrefslogtreecommitdiff
path: root/node_modules/is-path-inside
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/is-path-inside')
-rw-r--r--node_modules/is-path-inside/index.js14
-rw-r--r--node_modules/is-path-inside/package.json36
-rw-r--r--node_modules/is-path-inside/readme.md31
3 files changed, 81 insertions, 0 deletions
diff --git a/node_modules/is-path-inside/index.js b/node_modules/is-path-inside/index.js
new file mode 100644
index 000000000..0a4d2fd1e
--- /dev/null
+++ b/node_modules/is-path-inside/index.js
@@ -0,0 +1,14 @@
+'use strict';
+var path = require('path');
+var pathIsInside = require('path-is-inside');
+
+module.exports = function (a, b) {
+ a = path.resolve(a);
+ b = path.resolve(b);
+
+ if (a === b) {
+ return false;
+ }
+
+ return pathIsInside(a, b);
+};
diff --git a/node_modules/is-path-inside/package.json b/node_modules/is-path-inside/package.json
new file mode 100644
index 000000000..27a347154
--- /dev/null
+++ b/node_modules/is-path-inside/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "is-path-inside",
+ "version": "1.0.0",
+ "description": "Check if a path is inside another path",
+ "license": "MIT",
+ "repository": "sindresorhus/is-path-inside",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "path",
+ "inside",
+ "folder",
+ "directory",
+ "dir",
+ "file",
+ "resolve"
+ ],
+ "dependencies": {
+ "path-is-inside": "^1.0.1"
+ },
+ "devDependencies": {
+ "mocha": "*"
+ }
+}
diff --git a/node_modules/is-path-inside/readme.md b/node_modules/is-path-inside/readme.md
new file mode 100644
index 000000000..0e4eb74f7
--- /dev/null
+++ b/node_modules/is-path-inside/readme.md
@@ -0,0 +1,31 @@
+# is-path-inside [![Build Status](https://travis-ci.org/sindresorhus/is-path-inside.svg?branch=master)](https://travis-ci.org/sindresorhus/is-path-inside)
+
+> Check if a path is inside another path
+
+
+## Install
+
+```sh
+$ npm install --save is-path-inside
+```
+
+
+## Usage
+
+```js
+var isPathInside = require('is-path-inside');
+
+isPathInside('a/b', 'a/b/c');
+//=> true
+
+isPathInside('x/y', 'a/b/c');
+//=> false
+
+isPathInside('a/b/c', 'a/b/c');
+//=> false
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)