{"_id":"path-root","_rev":"79997","name":"path-root","description":"Get the root of a posix or windows filepath.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:25:35.000Z","created":"2016-03-29T06:58:41.555Z","0.1.1":"2016-03-29T07:14:27.534Z","0.1.0":"2016-03-29T06:58:41.555Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/path-root.git"},"versions":{"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","size":2380,"noattachment":false,"key":"/path-root/-/path-root-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-root/download/path-root-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/path-root-0.1.1.tgz_1459235666528_0.13938825554214418"},"directories":{},"publish_time":1459235667534,"_cnpm_publish_time":1459235667534,"_hasShrinkwrap":false},"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","size":2348,"noattachment":false,"key":"/path-root/-/path-root-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/path-root/download/path-root-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/path-root-0.1.0.tgz_1459234715643_0.10739205777645111"},"directories":{},"publish_time":1459234721555,"_cnpm_publish_time":1459234721555,"_hasShrinkwrap":false}},"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._","_attachments":{},"homepage":"https://github.com/jonschlinkert/path-root","bugs":{"url":"https://github.com/jonschlinkert/path-root/issues"},"license":"MIT"}