"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/path-is-inside/package.json" (8 Mar 2017, 2803 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) JSON source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {
    2   "_from": "path-is-inside@>=1.0.1 <1.1.0",
    3   "_id": "path-is-inside@1.0.1",
    4   "_location": "/path-is-inside",
    5   "_phantomChildren": {},
    6   "_requiredBy": [
    7     "/fs-vacuum",
    8     "/npm"
    9   ],
   10   "_resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.1.tgz",
   11   "_shasum": "98d8f1d030bf04bd7aeee4a1ba5485d40318fd89",
   12   "_shrinkwrap": null,
   13   "author": {
   14     "name": "Domenic Denicola",
   15     "email": "domenic@domenicdenicola.com",
   16     "url": "http://domenic.me"
   17   },
   18   "bugs": {
   19     "url": "http://github.com/domenic/path-is-inside/issues"
   20   },
   21   "dependencies": {},
   22   "description": "Tests whether one path is inside another path",
   23   "devDependencies": {
   24     "jshint": "~2.3.0",
   25     "mocha": "~1.15.1"
   26   },
   27   "homepage": "https://github.com/domenic/path-is-inside#readme",
   28   "keywords": [
   29     "path",
   30     "directory",
   31     "folder",
   32     "inside",
   33     "relative"
   34   ],
   35   "license": "WTFPL",
   36   "main": "lib/path-is-inside.js",
   37   "name": "path-is-inside",
   38   "optionalDependencies": {},
   39   "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\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",
   40   "readmeFilename": "README.md",
   41   "repository": {
   42     "type": "git",
   43     "url": "git://github.com/domenic/path-is-inside.git"
   44   },
   45   "scripts": {
   46     "lint": "jshint lib",
   47     "test": "mocha"
   48   },
   49   "version": "1.0.1"
   50 }