{"_id":"next-path","_rev":"950940","name":"next-path","description":"One step closer to your destination.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"sholladay","email":"me@seth-holladay.com"}],"time":{"modified":"2021-09-23T02:24:54.000Z","created":"2016-08-11T04:10:55.872Z","1.0.0":"2017-02-05T09:07:22.730Z","0.1.0":"2016-08-11T04:10:55.872Z"},"users":{},"author":{"name":"Seth Holladay","email":"me@seth-holladay.com","url":"http://seth-holladay.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/sholladay/next-path.git"},"versions":{"1.0.0":{"name":"next-path","version":"1.0.0","description":"One step closer to your destination.","homepage":"https://github.com/sholladay/next-path","main":"index.js","author":{"name":"Seth Holladay","email":"me@seth-holladay.com","url":"http://seth-holladay.com"},"scripts":{"test":"xo && ava"},"repository":{"type":"git","url":"git+ssh://git@github.com/sholladay/next-path.git"},"bugs":{"url":"https://github.com/sholladay/next-path/issues","email":"me@seth-holladay.com"},"engines":{"node":">=6"},"license":"MPL-2.0","files":["index.js"],"devDependencies":{"ava":"^0.18.1","eslint-config-tidy":"^0.4.1","xo":"^0.17.1"},"keywords":["add","concat","next","path","paths","segment","component","resolve","distance","between","relative","dir","directory","file"],"xo":{"extend":"tidy"},"gitHead":"ce2c1386836339bc473b76c9888947899ead8d56","_id":"next-path@1.0.0","_shasum":"822c4580d7abe783df19965b789622ca801603e4","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.4.0","_npmUser":{"name":"sholladay","email":"me@seth-holladay.com"},"maintainers":[{"name":"sholladay","email":"me@seth-holladay.com"}],"dist":{"shasum":"822c4580d7abe783df19965b789622ca801603e4","size":6843,"noattachment":false,"key":"/next-path/-/next-path-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/next-path/download/next-path-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/next-path-1.0.0.tgz_1486285641953_0.32420410867780447"},"directories":{},"publish_time":1486285642730,"_cnpm_publish_time":1486285642730,"_hasShrinkwrap":false},"0.1.0":{"name":"next-path","version":"0.1.0","description":"One step closer to your destination.","homepage":"https://github.com/sholladay/next-path","main":"index.js","author":{"name":"Seth Holladay","email":"me@seth-holladay.com","url":"http://seth-holladay.com"},"scripts":{"test":"xo"},"repository":{"type":"git","url":"git+ssh://git@github.com/sholladay/next-path.git"},"bugs":{"url":"https://github.com/sholladay/next-path/issues","email":"me@seth-holladay.com"},"engines":{"node":">=6"},"license":"MPL-2.0","files":["index.js"],"devDependencies":{"eslint-config-tidy":"^0.3.0","xo":"^0.16.0"},"keywords":["add","concat","next","path","paths","segment","component","resolve","distance","between","relative","dir","directory","file"],"xo":{"extend":"tidy"},"gitHead":"2e142ffd9123c541bd0c87eda3e21dd0dae853f0","_id":"next-path@0.1.0","_shasum":"79ca41af077abe47daf480b8ee1f8fb1075b4086","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.1","_npmUser":{"name":"sholladay","email":"me@seth-holladay.com"},"maintainers":[{"name":"sholladay","email":"me@seth-holladay.com"}],"dist":{"shasum":"79ca41af077abe47daf480b8ee1f8fb1075b4086","size":6728,"noattachment":false,"key":"/next-path/-/next-path-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/next-path/download/next-path-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/next-path-0.1.0.tgz_1470888655097_0.43238896410912275"},"directories":{},"publish_time":1470888655872,"_cnpm_publish_time":1470888655872,"_hasShrinkwrap":false}},"readme":"# next-path [![Build status for next-path on Circle CI.](https://img.shields.io/circleci/project/sholladay/next-path/master.svg \"Circle Build Status\")](https://circleci.com/gh/sholladay/next-path \"Next Path Builds\")\n\n> One step closer to your destination.\n\nLike an incremental [`path.relative()`](https://nodejs.org/api/path.html#path_path_relative_from_to \"Compute the path from one place to another.\").\n\n## Why?\n\n - Walk the file system without messy state.\n - Works well with functional programming styles.\n - Flexible about user input.\n\n## Install\n\n```sh\nnpm install next-path --save\n```\n\n## Usage\n\nGet it into your program.\n\n```js\nconst nextPath = require('next-path');\n```\n\nDetermine the next path, one step closer to the destination.\n\n```js\nconsole.log(nextPath('a', 'a/b/c'));  // => 'a/b'\nconsole.log(nextPath('../', '../../../'));  // => '../..'\n```\n\n## API\n\n### nextPath(from, to)\n\n#### from\n\nType: `string`\n\nThe base path that both `to` and the result will be relative to.\n\n#### to\n\nType: `string`\n\nThe path you want to move one step closer to.\n\n## Contributing\n\nSee our [contributing guidelines](https://github.com/sholladay/next-path/blob/master/CONTRIBUTING.md \"The guidelines for participating in this project.\") for more details.\n\n1. [Fork it](https://github.com/sholladay/next-path/fork).\n2. Make a feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. [Submit a pull request](https://github.com/sholladay/next-path/compare \"Submit code to this project for review.\").\n\n## License\n\n[MPL-2.0](https://github.com/sholladay/next-path/blob/master/LICENSE \"The license for next-path.\") © [Seth Holladay](http://seth-holladay.com \"Author of next-path.\")\n\nGo make something, dang it.\n","_attachments":{},"homepage":"https://github.com/sholladay/next-path","bugs":{"url":"https://github.com/sholladay/next-path/issues","email":"me@seth-holladay.com"},"license":"MPL-2.0"}