{"_id":"@aetherall/react-router-relative-link","_rev":"1-df9bf6b43ba6c73b854bd5864f143fff","name":"@aetherall/react-router-relative-link","dist-tags":{"latest":"4.0.2"},"versions":{"4.0.2":{"version":"4.0.2","name":"@aetherall/react-router-relative-link","description":"A wrapper around react-router's Link that allows relative paths.","keywords":["relative","path","pathname","router","react-router","react-router-relative-link","react","react-component"],"main":"./lib/index.js","scripts":{"prepublish":"npm run lint && npm run _build","build":"npm run lint && npm run _build","_build":"babel src --out-dir lib","test":"npm run lint && npm run _test","posttest":"cowsay Your tests all passed!","_test":"jest","test:watch":"jest --watch","lint":"eslint src"},"author":{"name":"Donavon West","email":"github@donavon.com","url":"http://donavon.com"},"license":"MIT","peerDependencies":{"react":"^15.4.2 || ^16.0.0","react-router-dom":"^4.1.2"},"dependencies":{"prop-types":"^15.5.10","resolve-pathname":"^2.1.0"},"devDependencies":{"babel-cli":"^6.24.1","babel-eslint":"^8.0.3","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-2":"^6.24.1","coveralls":"^3.0.0","cowsay":"^1.1.9","enzyme":"^3.2.0","enzyme-adapter-react-16":"^1.1.0","eslint":"^4.13.1","eslint-config-airbnb":"^16.1.0","eslint-plugin-import":"^2.3.0","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-react":"^7.1.0","jest":"^21.3.0-beta.15","react":"^16.2.0","react-dom":"^16.2.0","@aetherall/react-router-dom":"^4.3.1","react-test-renderer":"^16.2.0"},"jest":{"setupTestFrameworkScriptFile":"<rootDir>/setup-jest.js"},"repository":{"type":"git","url":"git://github.com/donavon/react-router-relative-link.git"},"bugs":{"url":"https://github.com/donavon/react-router-relative-link/issues"},"homepage":"https://github.com/donavon/react-router-relative-link","gitHead":"005043e1897cef19daf879599e36132ca7d062b8","_id":"@aetherall/react-router-relative-link@4.0.2","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"aetherall","email":"elieslou.dev@gmail.com"},"dist":{"integrity":"sha512-wjwutr0fIzpKhXoZjeIwIS61SKYwY/DS3HtHGgB1HcWyeD3ubEg0udwQyDkldLdl3RsMJuSOfIWUGZJ83V8XsA==","shasum":"92cac50b55edc33ae423d44c9bf99a16f32358de","tarball":"https://registry.npmjs.org/@aetherall/react-router-relative-link/-/react-router-relative-link-4.0.2.tgz","fileCount":14,"unpackedSize":189541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbR2T9CRA9TVsSAnZWagAAwuIP/jN8U3VuaL0YDb6bHL5V\n+Hlc2M7jOX6ulOc/06dQU/nFnt7WV3T5Gq90vieNV9HVOpgwxpGEpHvy2Hoa\n708vU1qrtmAha9d0zWmUQHlj2nKOfcNps4m2UZ+D/Ll8eNlHaliZ0bziTKcy\nShGfThv7jjdnYe4pm6GJknQFZj2rYPcG/YdIm+g90M3nBNBwMxXLRYnuMAY1\ny8k2uqqlHzjcvw7sy3ugbmzXtk8QZ0monml2wQu/ckQx+FtodEEGY322de+O\nRol1TDpqperEOmxMZnZ5l1AOY4JxUVq6Cw25k7ZWUi6A1H9Cs6Ld3nVgwNQd\nLfjq7l//JKCk72uo62LxgTIp0igBQJAGqIl+t2ExMcdqZuVj7JO1jqIz+xBP\n1P5lnwa2c9L7htdB+ZW0jDtNI64wmGgXf5S1HQ/kyx+QyjyJdXvm9o28kGiZ\n87HyGrqd6LXeTqQq9Bde6PeAqbKBeAcS6+w8uxBAe5/K8hFThYogjwCVXlk4\nNtU2HDa/Hk3Zn+Eoi6BC7Dn+DSCz2Ia1+T28QvJmRQLAUZ6eF5GogZsVwLXt\nKvpymUJxTQBP8gpXpG6eUpQp5qkxco9QeJuNhki9zs5nI2SPlgU6JJlZJogM\nlCpX7Fx2Nn2zXRSzB55GIbLdloIAXOBOi7ixubKLxx+0Vatr3qoI4+hvLRu7\nusgx\r\n=YXjz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBwozBfSbUVBbV668JqgqMikvy7xXzQE/EZPm5H818xDAiEAkMcjfM7a1umQ+xo7/JnaTQZLaoQ7mKaicWhtpk1jqP0="}]},"maintainers":[{"name":"aetherall","email":"elieslou.dev@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-router-relative-link_4.0.2_1531405565032_0.15427330815540286"},"_hasShrinkwrap":false}},"time":{"created":"2018-07-12T14:26:03.691Z","4.0.2":"2018-07-12T14:26:05.142Z","modified":"2022-04-04T11:49:53.103Z"},"maintainers":[{"name":"aetherall","email":"elieslou.dev@gmail.com"}],"description":"A wrapper around react-router's Link that allows relative paths.","homepage":"https://github.com/donavon/react-router-relative-link","keywords":["relative","path","pathname","router","react-router","react-router-relative-link","react","react-component"],"repository":{"type":"git","url":"git://github.com/donavon/react-router-relative-link.git"},"author":{"name":"Donavon West","email":"github@donavon.com","url":"http://donavon.com"},"bugs":{"url":"https://github.com/donavon/react-router-relative-link/issues"},"license":"MIT","readme":"# react-router-relative-link\n[![Build Status](https://travis-ci.org/donavon/react-router-relative-link.svg?branch=master)](https://travis-ci.org/donavon/react-router-relative-link)\n\nTL;DR\n\n* A wrapper around react-router's `<Link />` and `<NavLink />` that allows relative paths.\n* **Now supports `react-router-dom` version 4!**\n\n## Install\n```\n> npm i react-router-relative-link --save\n```\n\n## Usage\nTo use `react-router-relative-link`, simply `import` it (ES6) as `Link` in place of `react-router-dom`\nthen dot and dot-dot to your heart's content.\n\nSo in your code, replace this:\n```js\nimport { Link } from \"react-router-dom\";\n```\nwith the following and you're good to go!\n```js\nimport { Link } from \"react-router-relative-link\";\n```\n\nHere is a real world example. Notice that you don't need to know that you are at the base base `/zoo`, just like everywhere else in web land.\n\n```js\nimport { Link } from \"react-router-relative-link\";\n\nexport default class MyZoo extends React.Component {\n    render() {\n        return (\n            <p>Welcome to the Lions Den at /zoo/lions</p>\n            <Link to=\"..\">Back to the Zoo Entrance</Link>\n            <Link to=\"../giraffes\">Visit the Giraffes</Link>\n            <Link to=\"../monkeys\">Visit the Monkeys</Link>\n            <Link to=\"mountain\">Visit the Mountain Lions</Link>\n        );\n    }\n}\n```\n\n`react-router-relative-link` support passing `to` as a string or as an object with a `pathname` property, just like `react-router`.\n\nIt also works with both `Link` and with `NavLink`.\n\n### Does it Work?\n\nOf course it does, and I have the tests to prove it!\nSee the [test results](https://travis-ci.org/donavon/react-router-relative-link?branch=master) here.\n\nYou can also see it running live on\n[this CodeSandbox](https://codesandbox.io/s/pkpw96w4nq).\n","readmeFilename":"README.md"}