| 1 |
{ |
| 2 |
"_id": "path-is-inside", |
| 3 |
"_rev": "13-82329a93a832ed6b36b89a38bcbc14e2", |
| 4 |
"name": "path-is-inside", |
| 5 |
"description": "Tests whether one path is inside another path", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "1.0.2" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"1.0.0": { |
| 11 |
"name": "path-is-inside", |
| 12 |
"description": "Tests whether one path is inside another path", |
| 13 |
"keywords": [ |
| 14 |
"path", |
| 15 |
"directory", |
| 16 |
"folder", |
| 17 |
"inside", |
| 18 |
"relative" |
| 19 |
], |
| 20 |
"version": "1.0.0", |
| 21 |
"author": { |
| 22 |
"name": "Domenic Denicola", |
| 23 |
"email": "[email protected]", |
| 24 |
"url": "http://domenic.me" |
| 25 |
}, |
| 26 |
"license": "WTFPL", |
| 27 |
"repository": { |
| 28 |
"type": "git", |
| 29 |
"url": "git://github.com/domenic/path-is-inside.git" |
| 30 |
}, |
| 31 |
"bugs": { |
| 32 |
"url": "http://github.com/domenic/path-is-inside/issues" |
| 33 |
}, |
| 34 |
"main": "lib/path-is-inside.js", |
| 35 |
"scripts": { |
| 36 |
"test": "mocha", |
| 37 |
"lint": "jshint lib" |
| 38 |
}, |
| 39 |
"devDependencies": { |
| 40 |
"jshint": "~2.3.0", |
| 41 |
"mocha": "~1.15.1" |
| 42 |
}, |
| 43 |
"homepage": "https://github.com/domenic/path-is-inside", |
| 44 |
"_id": "[email protected]", |
| 45 |
"dist": { |
| 46 |
"shasum": "8ec1c42a4c1a039e3e75f6e9e6029bd0c699016e", |
| 47 |
"tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.0.tgz" |
| 48 |
}, |
| 49 |
"_from": ".", |
| 50 |
"_npmVersion": "1.3.15", |
| 51 |
"_npmUser": { |
| 52 |
"name": "domenic", |
| 53 |
"email": "[email protected]" |
| 54 |
}, |
| 55 |
"maintainers": [ |
| 56 |
{ |
| 57 |
"name": "domenic", |
| 58 |
"email": "[email protected]" |
| 59 |
} |
| 60 |
], |
| 61 |
"directories": {} |
| 62 |
}, |
| 63 |
"1.0.1": { |
| 64 |
"name": "path-is-inside", |
| 65 |
"description": "Tests whether one path is inside another path", |
| 66 |
"keywords": [ |
| 67 |
"path", |
| 68 |
"directory", |
| 69 |
"folder", |
| 70 |
"inside", |
| 71 |
"relative" |
| 72 |
], |
| 73 |
"version": "1.0.1", |
| 74 |
"author": { |
| 75 |
"name": "Domenic Denicola", |
| 76 |
"email": "[email protected]", |
| 77 |
"url": "http://domenic.me" |
| 78 |
}, |
| 79 |
"license": "WTFPL", |
| 80 |
"repository": { |
| 81 |
"type": "git", |
| 82 |
"url": "git://github.com/domenic/path-is-inside.git" |
| 83 |
}, |
| 84 |
"bugs": { |
| 85 |
"url": "http://github.com/domenic/path-is-inside/issues" |
| 86 |
}, |
| 87 |
"main": "lib/path-is-inside.js", |
| 88 |
"scripts": { |
| 89 |
"test": "mocha", |
| 90 |
"lint": "jshint lib" |
| 91 |
}, |
| 92 |
"devDependencies": { |
| 93 |
"jshint": "~2.3.0", |
| 94 |
"mocha": "~1.15.1" |
| 95 |
}, |
| 96 |
"homepage": "https://github.com/domenic/path-is-inside", |
| 97 |
"_id": "[email protected]", |
| 98 |
"dist": { |
| 99 |
"shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89", |
| 100 |
"tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz" |
| 101 |
}, |
| 102 |
"_from": ".", |
| 103 |
"_npmVersion": "1.3.25", |
| 104 |
"_npmUser": { |
| 105 |
"name": "domenic", |
| 106 |
"email": "[email protected]" |
| 107 |
}, |
| 108 |
"maintainers": [ |
| 109 |
{ |
| 110 |
"name": "domenic", |
| 111 |
"email": "[email protected]" |
| 112 |
} |
| 113 |
], |
| 114 |
"directories": {} |
| 115 |
}, |
| 116 |
"1.0.2": { |
| 117 |
"name": "path-is-inside", |
| 118 |
"description": "Tests whether one path is inside another path", |
| 119 |
"keywords": [ |
| 120 |
"path", |
| 121 |
"directory", |
| 122 |
"folder", |
| 123 |
"inside", |
| 124 |
"relative" |
| 125 |
], |
| 126 |
"version": "1.0.2", |
| 127 |
"author": { |
| 128 |
"name": "Domenic Denicola", |
| 129 |
"email": "[email protected]", |
| 130 |
"url": "https://domenic.me" |
| 131 |
}, |
| 132 |
"license": "(WTFPL OR MIT)", |
| 133 |
"repository": { |
| 134 |
"type": "git", |
| 135 |
"url": "git+https://github.com/domenic/path-is-inside.git" |
| 136 |
}, |
| 137 |
"main": "lib/path-is-inside.js", |
| 138 |
"files": [ |
| 139 |
"lib" |
| 140 |
], |
| 141 |
"scripts": { |
| 142 |
"test": "mocha", |
| 143 |
"lint": "jshint lib" |
| 144 |
}, |
| 145 |
"devDependencies": { |
| 146 |
"jshint": "~2.3.0", |
| 147 |
"mocha": "~1.15.1" |
| 148 |
}, |
| 149 |
"gitHead": "05a9bf7c5e008505539e14e96c4d2fc8b2c6d058", |
| 150 |
"bugs": { |
| 151 |
"url": "https://github.com/domenic/path-is-inside/issues" |
| 152 |
}, |
| 153 |
"homepage": "https://github.com/domenic/path-is-inside#readme", |
| 154 |
"_id": "[email protected]", |
| 155 |
"_shasum": "365417dede44430d1c11af61027facf074bdfc53", |
| 156 |
"_from": ".", |
| 157 |
"_npmVersion": "3.9.5", |
| 158 |
"_nodeVersion": "6.2.2", |
| 159 |
"_npmUser": { |
| 160 |
"name": "domenic", |
| 161 |
"email": "[email protected]" |
| 162 |
}, |
| 163 |
"dist": { |
| 164 |
"shasum": "365417dede44430d1c11af61027facf074bdfc53", |
| 165 |
"tarball": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" |
| 166 |
}, |
| 167 |
"maintainers": [ |
| 168 |
{ |
| 169 |
"name": "domenic", |
| 170 |
"email": "[email protected]" |
| 171 |
} |
| 172 |
], |
| 173 |
"_npmOperationalInternal": { |
| 174 |
"host": "packages-16-east.internal.npmjs.com", |
| 175 |
"tmp": "tmp/path-is-inside-1.0.2.tgz_1473550509195_0.936812553787604" |
| 176 |
}, |
| 177 |
"directories": {} |
| 178 |
} |
| 179 |
}, |
| 180 |
"readme": "# Is This Path Inside This Other Path?\n\nIt turns out this question isn't trivial to answer using Node's built-in path APIs. A naive `indexOf`-based solution will fail sometimes on Windows, which is case-insensitive (see e.g. [isaacs/npm#4214][]). You might then think to be clever with `path.resolve`, but you have to be careful to account for situations whether the paths have different drive letters, or else you'll cause bugs like [isaacs/npm#4313][]. And let's not even get started on trailing slashes.\n\nThe **path-is-inside** package will give you a robust, cross-platform way of detecting whether a given path is inside another path.\n\n## Usage\n\nPretty simple. First the path being tested; then the potential parent. Like so:\n\n```js\nvar pathIsInside = require(\"path-is-inside\");\n\npathIsInside(\"/x/y/z\", \"/x/y\") // true\npathIsInside(\"/x/y\", \"/x/y/z\") // false\n```\n\nPaths are considered to be inside themselves:\n\n```js\npathIsInside(\"/x/y\", \"/x/y\"); // true\n```\n\n## OS-Specific Behavior\n\nLike Node's built-in path module, path-is-inside treats all file paths on Windows as case-insensitive, whereas it treats all file paths on *-nix operating systems as case-sensitive. Keep this in mind especially when working on a Mac, where, despite Node's defaults, the OS usually treats paths case-insensitively.\n\nIn practice, this means:\n\n```js\n// On Windows\n\npathIsInside(\"C:\\\\X\\\\Y\\\\Z\", \"C:\\\\x\\\\y\") // true\n\n// On *-nix, including Mac OS X\n\npathIsInside(\"/X/Y/Z\", \"/x/y\") // false\n```\n\n[isaacs/npm#4214]: https://github.com/isaacs/npm/pull/4214\n[isaacs/npm#4313]: https://github.com/isaacs/npm/issues/4313\n", |
| 181 |
"maintainers": [ |
| 182 |
{ |
| 183 |
"name": "domenic", |
| 184 |
"email": "[email protected]" |
| 185 |
} |
| 186 |
], |
| 187 |
"time": { |
| 188 |
"modified": "2017-04-24T02:30:58.548Z", |
| 189 |
"created": "2013-12-14T20:22:09.795Z", |
| 190 |
"1.0.0": "2013-12-14T20:22:11.015Z", |
| 191 |
"1.0.1": "2014-03-01T01:23:46.147Z", |
| 192 |
"1.0.2": "2016-09-10T23:35:10.802Z" |
| 193 |
}, |
| 194 |
"author": { |
| 195 |
"name": "Domenic Denicola", |
| 196 |
"email": "[email protected]", |
| 197 |
"url": "https://domenic.me" |
| 198 |
}, |
| 199 |
"repository": { |
| 200 |
"type": "git", |
| 201 |
"url": "git+https://github.com/domenic/path-is-inside.git" |
| 202 |
}, |
| 203 |
"readmeFilename": "README.md", |
| 204 |
"homepage": "https://github.com/domenic/path-is-inside#readme", |
| 205 |
"keywords": [ |
| 206 |
"path", |
| 207 |
"directory", |
| 208 |
"folder", |
| 209 |
"inside", |
| 210 |
"relative" |
| 211 |
], |
| 212 |
"bugs": { |
| 213 |
"url": "https://github.com/domenic/path-is-inside/issues" |
| 214 |
}, |
| 215 |
"license": "(WTFPL OR MIT)", |
| 216 |
"users": { |
| 217 |
"sbruchmann": true, |
| 218 |
"mattmcfarland": true, |
| 219 |
"scottfreecode": true, |
| 220 |
"kontrax": true |
| 221 |
}, |
| 222 |
"_attachments": {} |
| 223 |
} |