{
  "_id": "path-root",
  "maintainers": [
    {
      "name": "jonschlinkert",
      "email": "github@sellside.com"
    }
  ],
  "keywords": [
    "path",
    "root"
  ],
  "dist-tags": {
    "latest": "0.1.1"
  },
  "author": {
    "name": "Jon Schlinkert",
    "url": "https://github.com/jonschlinkert"
  },
  "_rev": "4-a05a13552bbfc4caf3e8db0049541d10",
  "description": "Get the root of a posix or windows filepath.",
  "readme": "# path-root [![NPM version](https://img.shields.io/npm/v/path-root.svg?style=flat)](https://www.npmjs.com/package/path-root) [![NPM downloads](https://img.shields.io/npm/dm/path-root.svg?style=flat)](https://npmjs.org/package/path-root) [![Build Status](https://img.shields.io/travis/jonschlinkert/path-root.svg?style=flat)](https://travis-ci.org/jonschlinkert/path-root)\n\n> Get the root of a posix or windows filepath.\n\nYou might also be interested in [parse-filepath](https://github.com/jonschlinkert/parse-filepath).\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install path-root --save\n```\n\n## Usage\n\n```js\nvar pathRoot = require('path-root');\n```\n\n**Examples**\n\n```js\npathRoot('\\\\\\\\server\\\\share\\\\abc');\n//=> '\\\\\\\\server\\\\share\\\\'\n\npathRoot('\\\\\\\\server foo\\\\some folder\\\\base-file.js');\n//=> '\\\\\\\\server foo\\\\some folder\\\\'\n\npathRoot('\\\\\\\\?\\\\UNC\\\\server\\\\share');\n//=> '\\\\\\\\?\\\\UNC\\\\'\n\npathRoot('foo/bar/baz.js');\n//=> ''\n\npathRoot('c:\\\\foo\\\\bar\\\\baz.js');\n//=> 'c:\\\\'\n\npathRoot('\\\\\\\\slslslsl\\\\admin$\\\\system32');\n//=> '\\\\\\\\slslslsl\\\\admin$\\\\'\n\npathRoot('/foo/bar/baz.js');\n//=> '/'\n```\n\n## Related projects\n\nYou might also be interested in these projects:\n\n* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute)\n* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Parse a filepath into an object. Falls back on the native node.js `path.parse` method if… [more](https://www.npmjs.com/package/parse-filepath) | [homepage](https://github.com/jonschlinkert/parse-filepath)\n* [path-root-regex](https://www.npmjs.com/package/path-root-regex): Regular expression for getting the root of a posix or windows filepath. | [homepage](https://github.com/regexhq/path-root-regex)\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/path-root/issues/new).\n\n## Building docs\n\nGenerate readme and API documentation with [verb](https://github.com/verbose/verb):\n\n```sh\n$ npm install verb && npm run docs\n```\n\nOr, if [verb](https://github.com/verbose/verb) is installed globally:\n\n```sh\n$ verb\n```\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm install -d && npm test\n```\n\n## Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT license](https://github.com/jonschlinkert/path-root/blob/master/LICENSE).\n\n***\n\n_This file was generated by [verb](https://github.com/verbose/verb), v, on March 29, 2016._",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/jonschlinkert/path-root.git"
  },
  "bugs": {
    "url": "https://github.com/jonschlinkert/path-root/issues"
  },
  "license": "MIT",
  "versions": {
    "0.1.0": {
      "name": "path-root",
      "description": "Get the root of a posix or windows filepath.",
      "version": "0.1.0",
      "homepage": "https://github.com/jonschlinkert/path-root",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/path-root.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/path-root/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=0.10.0"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "path-root-regex": "^0.1.0"
      },
      "devDependencies": {
        "gulp-format-md": "^0.1.7",
        "mocha": "^2.4.5"
      },
      "keywords": [
        "path",
        "root"
      ],
      "verb": {
        "run": true,
        "toc": false,
        "layout": "default",
        "tasks": [
          "readme"
        ],
        "plugins": [
          "gulp-format-md"
        ],
        "related": {
          "list": [
            "path-root-regex",
            "parse-filepath",
            "is-absolute"
          ]
        },
        "reflinks": [
          "verb"
        ],
        "lint": {
          "reflinks": true
        }
      },
      "_id": "path-root@0.1.0",
      "_shasum": "495b609052435ce329fc02d1a736e78070456c96",
      "_from": ".",
      "_npmVersion": "3.6.0",
      "_nodeVersion": "5.5.0",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "dist": {
        "shasum": "495b609052435ce329fc02d1a736e78070456c96",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/path-root/-/path-root-0.1.0.tgz",
        "integrity": "sha512-UfdCi4tJW4y8uY30iHU4+Zc72sLamTq/jmjXQ02sw476UqU7RwSizzQhdopDbogYpuR6NzqbmekYg31wXrIXbQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIGqqgtEXjNLu+O3BdiXjn1pD1CZ3ngXQZJe6NR5hlFgKAiBEzKyOL00238lc7UcxuufzSzQRSLtRuHVVVuWKANkr+w=="
          }
        ]
      },
      "_npmOperationalInternal": {
        "host": "packages-12-west.internal.npmjs.com",
        "tmp": "tmp/path-root-0.1.0.tgz_1459234715643_0.10739205777645111"
      }
    },
    "0.1.1": {
      "name": "path-root",
      "description": "Get the root of a posix or windows filepath.",
      "version": "0.1.1",
      "homepage": "https://github.com/jonschlinkert/path-root",
      "author": {
        "name": "Jon Schlinkert",
        "url": "https://github.com/jonschlinkert"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jonschlinkert/path-root.git"
      },
      "bugs": {
        "url": "https://github.com/jonschlinkert/path-root/issues"
      },
      "license": "MIT",
      "files": [
        "index.js"
      ],
      "main": "index.js",
      "engines": {
        "node": ">=0.10.0"
      },
      "scripts": {
        "test": "mocha"
      },
      "dependencies": {
        "path-root-regex": "^0.1.0"
      },
      "devDependencies": {
        "gulp-format-md": "^0.1.7",
        "mocha": "^2.4.5"
      },
      "keywords": [
        "path",
        "root"
      ],
      "verb": {
        "run": true,
        "toc": false,
        "layout": "default",
        "tasks": [
          "readme"
        ],
        "plugins": [
          "gulp-format-md"
        ],
        "related": {
          "highlight": "parse-filepath",
          "list": [
            "path-root-regex",
            "parse-filepath",
            "is-absolute"
          ]
        },
        "reflinks": [
          "verb"
        ],
        "lint": {
          "reflinks": true
        }
      },
      "gitHead": "2f1a3929dece0f8bb645b8eb6123dd53f05cd503",
      "_id": "path-root@0.1.1",
      "_shasum": "9a4a6814cac1c0cd73360a95f32083c8ea4745b7",
      "_from": ".",
      "_npmVersion": "3.6.0",
      "_nodeVersion": "5.5.0",
      "_npmUser": {
        "name": "jonschlinkert",
        "email": "github@sellside.com"
      },
      "maintainers": [
        {
          "name": "jonschlinkert",
          "email": "github@sellside.com"
        }
      ],
      "dist": {
        "shasum": "9a4a6814cac1c0cd73360a95f32083c8ea4745b7",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/path-root/-/path-root-0.1.1.tgz",
        "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIDfjZJfw6hCF58UvxcsuBx3brhPGCW9QS8mBwoKpdFEmAiEAqwfj8BGnyI16KQh54b7FxM9juEFnVNGq8O2Tr6SXsPY="
          }
        ]
      },
      "_npmOperationalInternal": {
        "host": "packages-16-east.internal.npmjs.com",
        "tmp": "tmp/path-root-0.1.1.tgz_1459235666528_0.13938825554214418"
      }
    }
  },
  "name": "path-root",
  "time": {
    "modified": "2026-05-20T15:56:36.488Z",
    "created": "2016-03-29T06:58:41.555Z",
    "0.1.0": "2016-03-29T06:58:41.555Z",
    "0.1.1": "2016-03-29T07:14:27.534Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/jonschlinkert/path-root"
}