{"_id":"@dcalvo/electron-routes","_rev":"5-82f38ac56a4e9ae937cc893f667acc54","name":"@dcalvo/electron-routes","dist-tags":{"latest":"1.5.3"},"versions":{"1.4.0":{"name":"@dcalvo/electron-routes","version":"1.4.0","main":"src/index.js","typings":"index.d.ts","author":{"name":"David Calvo"},"license":"MIT","dependencies":{"electron":"^13.1.7","path-to-regexp":"^1.6.0","stream-buffers":"^3.0.1"},"scripts":{"start":"electron example/main.js"},"devDependencies":{"eslint":"^3.8.1","eslint-config-airbnb-base":"^9.0.0","eslint-plugin-import":"^2.0.0"},"gitHead":"0fcab7bdf34e5dd86671ecbaa556d5db65e7e687","description":"[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r [![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js","_id":"@dcalvo/electron-routes@1.4.0","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-gHvFI+f5a/qr0wyOjv4GNI9brikqbdMIiut3sESyREi72IN2/8aX9sVq6BqCZ78ycuTv7uTPZU0oXHbsUGfl+g==","shasum":"0c58fb7e85eee21ccf4d915f44d5aa244a8fef60","tarball":"https://registry.npmjs.org/@dcalvo/electron-routes/-/electron-routes-1.4.0.tgz","fileCount":10,"unpackedSize":18077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9x7ECRA9TVsSAnZWagAAz5EQAJkZbC0wwJORZavyL0HM\nftM3KeD1V/ziXAYwPo1svMgEkjO71NpOwNT8jHtR2deK1vunG4iB8tC7GgwS\nAJssUnZU3bAV1M7YZJyzJEnSfMD4UeGNBDGNEAFStZKjT9Gb+AKNv/eIwDQh\nEaPEcnx9rbBQmAIL4hqcvpTxRmdcY71R9vevbALps5iFNBV+xYMECH6AKSR6\nArlTmaFEgJqhxw9UhB9L/VHW3F0XGCC/Fz0xg92c0QV/A6j32Tr9Eb+3yvKK\nO1HA6/wn9/V/V6F+nORWAtETMv8+BytTCfWBkAN7Ex5MzRiP01tqBktyibOY\nMzqariE67V6uzlIsAjenjz39WqIe/JrLhl/mgAa1XlpIviw1WkdPm3j5eKiT\nicjRSghIgOgcZ0I51ENGqvSwvisKVpUw3xgZ2i9DdCsZ9oA1KmHKBzjQyXo6\nMwJSCKdDx5h3ngxAiMyyMAkznO+ysi8NjhqAHuuJnwTyTx80aHIJ0UuWB8dx\nA/Lx2MWl5NQZ7peueYHQ2pkmZKUXBeEvjBavbWDZR/AtoAzLRd7MzSghnfGH\nTf2iWAY3ZA1EutCiAxN62tvkXW21gZ6K07YEOoMhrw78jDbvIKdHkLGtzuc4\nm1P638tlluF4+pSRBwkrtSoBsThM7rM5zPsKoPb18NSJnep9DPejxtDI9sAb\n7tkV\r\n=Aypu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqdOSdjiFH2ruGqN25lyDLgED9zpNSaBQf8dusgkPz9QIgLISJLqelYShIfZVpYScoKxyHlOQwDQnLlcAYXjXISWg="}]},"_npmUser":{"name":"dcalvo","email":"dcalvo2@jhu.edu"},"directories":{},"maintainers":[{"name":"dcalvo","email":"dcalvo2@jhu.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/electron-routes_1.4.0_1626808004463_0.5115710762228638"},"_hasShrinkwrap":false},"1.5.0":{"name":"@dcalvo/electron-routes","version":"1.5.0","main":"src/index.js","typings":"index.d.ts","author":{"name":"David Calvo"},"license":"MIT","dependencies":{"electron":"^13.1.7","path-to-regexp":"^1.6.0","stream-buffers":"^3.0.1"},"scripts":{"start":"electron example/main.js","build":"tsc"},"devDependencies":{"@types/stream-buffers":"^3.0.4","eslint":"^3.8.1","eslint-config-airbnb-base":"^9.0.0","eslint-plugin-import":"^2.0.0","typescript":"^4.3.5"},"gitHead":"ab70cdaacfa9338638e0f516a1b2289ca8b271aa","description":"[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r [![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js","_id":"@dcalvo/electron-routes@1.5.0","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-0lWmgY/3QFbaMgwkcPwn5IgTZUAaZU7l/DFBt55UkvCHGecA9OUF745p0nS9V/Ux5L1tchcSjViGaOdQ8fHGvg==","shasum":"1c42a305163e5e85e4d7436cd04310e44120646f","tarball":"https://registry.npmjs.org/@dcalvo/electron-routes/-/electron-routes-1.5.0.tgz","fileCount":7,"unpackedSize":17586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+Hd4CRA9TVsSAnZWagAA96cP/2b9hdjRfcis37oqQXpZ\n8MAoxAyAPuNiQOW631XDov8XQl6KkVZFJAtfs6+o87xmUuh5dagKVry2EmmC\ngZ8MtqaEIuiYiM2JOE7LaSqdh0YePlKcJ32g7ZaXZnGc9i7+iH22qWcdKWmn\nQgGs371aqfteDIFzz0tw92kX/q13Vk1KSRfxnI+Elgvci0H+IMzr3eF4pMIL\ne5ffw1NrsBeJyZ8MRYEM3M0SGyDknpJg/HWPiV4OwioVOUMkDowUsXtdBl7n\n3T57lPfV+C10aQLfZOcTldo/S0wq7N88j4J9pYZPm919cXSrHQrIdINuPa+8\n0zJK+eechwAiILZTznAmu/7OzXYzg5lTAGts2vyfFm/jI4U55eVTgj9tGeMI\n4phO6mLCmorRBTC0l8sbbQ8WLS+0LllGA0k9egOR0m/HynhpxN+V4lUbzv91\nHmit7Ar/x1jHcPH8qbdQRlqKd/dBqYS2qzzNJoyilJHhULGf7pJ+/8s48Khd\no3kynfLF4+EEKnLxr4SI9Gv+4s03SGf0iUaGRdCP398oM0XiHA/gJrt5XBbp\n9HweNmmVZVZH9EAEXlr62eJR0FzyLqe1BAUdpIii4rStDSUbbqogBoisdmT/\n6s+8zcdqyhgeg4WxwpptZxsf5X7KxTAR/pEQ6txyQj/hnCgAUCCF0annTaj5\n9W3y\r\n=M0bl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH2Ik5CO59+eehibmcZEypBV4XxgHE/OqW1V2TC9v9GgCIBfpm448VqVzzaMB5hR29Km55WgMfgMweWe6Docv868y"}]},"_npmUser":{"name":"dcalvo","email":"dcalvo2@jhu.edu"},"directories":{},"maintainers":[{"name":"dcalvo","email":"dcalvo2@jhu.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/electron-routes_1.5.0_1626896248544_0.8934993368819029"},"_hasShrinkwrap":false},"1.5.1":{"name":"@dcalvo/electron-routes","version":"1.5.1","main":"dist/index.js","typings":"index.d.ts","author":{"name":"David Calvo"},"license":"MIT","dependencies":{"electron":"^13.1.7","path-to-regexp":"^1.6.0","stream-buffers":"^3.0.1"},"scripts":{"start":"electron example/main.js","build":"tsc"},"devDependencies":{"@types/stream-buffers":"^3.0.4","eslint":"^3.8.1","eslint-config-airbnb-base":"^9.0.0","eslint-plugin-import":"^2.0.0","typescript":"^4.3.5"},"gitHead":"b9570d15a62aa421ff600e859bb87dabf7d1fa0d","description":"[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r [![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js","_id":"@dcalvo/electron-routes@1.5.1","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-hcQH34YSYc+3IbU6IYBByHMZxRVWwLN3GMcOJYZKHqMrFC6yzijE9tIyIQvaMl6+txaKMi7EQ26PnIcHL/OQcg==","shasum":"6fe09fc351efd4740ba2851e366bf2dc435ba444","tarball":"https://registry.npmjs.org/@dcalvo/electron-routes/-/electron-routes-1.5.1.tgz","fileCount":7,"unpackedSize":18225,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+HnfCRA9TVsSAnZWagAAFf0P/iZj1NBd5S/ons1raKh6\nKkx52b2dDLE3ql6X/bxADs7LpH3sIvTS/jbbufWqCkfpGmlj/bUqdejl2is+\nW3oQTw7gPZLk13Q61oC/+Fh4lCvo2PkhbNWQfOipeHP80H1nPC0r1jjVMQ/6\nBM1fPSZPHJOE9GJEX4sKbvWRVryyuPBNLLXRcJ1Ok0BaxPVcv36ZuE5sk2bi\nwV77QapKsDcpDj80vQNgyyoICNNABJwFe+2v93rslnjgbPd5SEDSZrldw51E\nYDFUwrImXMBpubjV2S8qydrSjNGxeQOSEH8vc6zdAbMte/6+ZvfrAwDo2r/+\nrM2zqGc/p6U2sadb6DmUMk1e5BDqwu8Jde3kViAPie2y7nnWVopS7jvXB35i\n4UJ4MqrTx0DgVTOUX6MKfu0kkaByASzphGQUSWaPBfKvAAHM7uhadEllIBWs\nX9dWb9U8AZLUgCbDXEvLtrsiBga0RMBSQLWNAQ2Vi+VZx67i/7BOvMK6Ktm7\nnJ5gQLCechGT2DDtzw1++Ngqf0Tsx5/0/ITN+/1hPJO/Sy4X6nfZYgrLTFTp\nHydCvncSQy2WKovpNuQDjIPxF7TYQqCK1QUsa8xK61SNDMVCNSEBpBZUPIID\nNMH3PtmeDRuDMtbu7qwG8aC02YP8iDjaTEm2lTgchBtOHktoaqaOKtMVSftN\nc1Zo\r\n=/DNj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCu2rJsQFYyO7tf0krR3ofzXFEerdT0APQm0GANCpZjIwIgFpT2XYx3qJ127jZxPviOAsWo23rQGtZZjDI54fPokGQ="}]},"_npmUser":{"name":"dcalvo","email":"dcalvo2@jhu.edu"},"directories":{},"maintainers":[{"name":"dcalvo","email":"dcalvo2@jhu.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/electron-routes_1.5.1_1626896863070_0.16103182639853464"},"_hasShrinkwrap":false},"1.5.2":{"name":"@dcalvo/electron-routes","version":"1.5.2","main":"dist/index.js","typings":"index.d.ts","author":{"name":"David Calvo"},"repository":{"url":"git+https://github.com/dcalvo/electron-routes.git"},"license":"MIT","dependencies":{"electron":"^13.1.7","path-to-regexp":"^1.6.0","stream-buffers":"^3.0.1"},"scripts":{"start":"electron example/main.js","build":"tsc"},"devDependencies":{"@types/stream-buffers":"^3.0.4","eslint":"^3.8.1","eslint-config-airbnb-base":"^9.0.0","eslint-plugin-import":"^2.0.0","typescript":"^4.3.5"},"gitHead":"93e1545be9e691bcbae2a81afa8fcb990a41e6cb","description":"[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r [![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js","bugs":{"url":"https://github.com/dcalvo/electron-routes/issues"},"homepage":"https://github.com/dcalvo/electron-routes#readme","_id":"@dcalvo/electron-routes@1.5.2","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-wSQ/DxqD76p/AtY9MCCTBOjmnXddeCvA3T428/BGf1QT6pNxZhcCpYl2yuRY8df4ssbzov1QVMj2jUtDHfPImA==","shasum":"f32f0acfad1a7844e608e81f91879e69bda6cfcf","tarball":"https://registry.npmjs.org/@dcalvo/electron-routes/-/electron-routes-1.5.2.tgz","fileCount":7,"unpackedSize":18393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+IKVCRA9TVsSAnZWagAAA9EQAJgP/4qQPAjI2fK9VGUw\nrbYvpkFhczkLatNFQ2jaMxfmf83QLDVNwrbFbq1SKwlFieaRFnB0sLNups2a\nsLODUtp/sggeLU9QBVjT4dd2b2dp5wxJBYdx0CEYWDABCppL28ykovzyD5iB\nZr4iuuQlxeDZxtRyvbYG0pFtc2q0DUpVeeloComXenwzYAnVIYgU5ocpYdwC\ns/b+Q4jWeWqFXILGgjPcA6boUNyIhRr98W2JqPVVPJdXcLlWszI5NC5EqVVq\nXRP9yb4itCUoS0+2iSTYcHoy9vYRx8bM8ysuUd75lI0nG+obAga6qiQX2lRb\n4mCa7ObPlgMgp9TmvBO/Ev+fAYoqG1EbVP+vQ4nAOAEbqFwxVkzj4AOfyJZd\ne284yr099PBpDgzoFPfu6M+lYBgzDtoWLIDT9dZqa/YCfCAj7xBK+9Tkwpyd\n7Ysi1IYLcem0/+FK3CFo7IknolWttfYbk009vQCo8vRKT3WKhbf33qoZZ344\nH6OtpJwvNSQv/6UqXpj/+2gtANERBJsvLQOVyp53PqKavn7TWCVmzNXCglXo\nYibVwvQAvq/pKKv8fBn11foM3xNV+BpFazTbIIkeD2ZJ/dpHxlptG5Bxs1e9\nj6wXYGvYh8ehyoHhj1uzM5UMrtI8mvO7jYIb2PA9Laj6EmKvSr05PmbcCY9s\nXAIM\r\n=2qZJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOgAFj0ukLk4KGMBJSxMGHXBswQfJHV8l4HcYai6bsjgIgePDi030y4Z7MIt8r8j1byaRyyk7nED7Tv2PyjZX7S+w="}]},"_npmUser":{"name":"dcalvo","email":"dcalvo2@jhu.edu"},"directories":{},"maintainers":[{"name":"dcalvo","email":"dcalvo2@jhu.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/electron-routes_1.5.2_1626899093039_0.522023833806222"},"_hasShrinkwrap":false},"1.5.3":{"name":"@dcalvo/electron-routes","version":"1.5.3","main":"dist/index.js","typings":"index.d.ts","author":{"name":"David Calvo"},"repository":{"url":"git+https://github.com/dcalvo/electron-routes.git"},"license":"MIT","dependencies":{"electron":"^13.1.7","path-to-regexp":"^1.6.0","qs":"^6.10.1","stream-buffers":"^3.0.1"},"scripts":{"start":"electron example/main.js","build":"tsc"},"devDependencies":{"@types/qs":"^6.9.7","@types/stream-buffers":"^3.0.4","eslint":"^3.8.1","eslint-config-airbnb-base":"^9.0.0","eslint-plugin-import":"^2.0.0","typescript":"^4.3.5"},"gitHead":"b96c26c92a5c81f46229cdac263218cdbd8556ab","description":"[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r [![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js","bugs":{"url":"https://github.com/dcalvo/electron-routes/issues"},"homepage":"https://github.com/dcalvo/electron-routes#readme","_id":"@dcalvo/electron-routes@1.5.3","_nodeVersion":"16.3.0","_npmVersion":"7.15.1","dist":{"integrity":"sha512-Ll6Su/vrA+sZdoSo96gpsRB+wZVJJ1Kgwvz/fZwM7Ee6XyoCgD8mq0QTPZwkw4+5cCr6Z3rY5QLBcdzoyIOhzA==","shasum":"3bc081ccba5f13a61fc26fcea688e5b4d9b04591","tarball":"https://registry.npmjs.org/@dcalvo/electron-routes/-/electron-routes-1.5.3.tgz","fileCount":7,"unpackedSize":18686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+y6GCRA9TVsSAnZWagAA9bEP/3opVL+7vwi4CikzXBWO\n8n5mcb/f12mQ54SqcNfU2AtWRJRrK5hN2BIT2Zo7gNl4t3GPzVDyjet54Wq2\nwWKUg1PN8KsKRoV20DhahJwZqDQhCMYhHExKaecs8mT6MdTc3KT3up3EI1oi\nH0Z2yTjpMxPLneH/II25rI7c9YWSFUehJ1VxWjDDgT2BwBq8vJUVhe0Duwyc\nCnybe0kX2//UFjcAFX5o7ameoSFSQS9MFvNLDpyuux/dO2B6dQKIf1gUuLxp\nxskE7T5oWmTt03SZuPNXhJP8RquiFsiMUzT3LhLeIlefJevGkKjCMOGhgw+4\n3YwltqHDvrETKI9DNrDxxP2DYveJPiw0J/0TaoX1/5f3QcY/tqWIq+SH2L5N\noR2GnuYnZ7nKQLQN7dQCLEx3bivLi2e/+OXSxMhWPz7uwxfFjtI598IwCJer\nMR9/MpP71dOHSEg/zsKpcJdNH1d/1ufmN+vpVleCYWocEYZFZ3dbsg72QA4P\njHdAYD6jYPF/t3PVP+W4xGEiura/qZMu5PuwaKynN009Ftbe5bwoMcLHRSAJ\nDamQxoA7mYWg70dxt7beXSw8pFmL3D2+hIHDAYH8y+lNRWvFsWoiu8r1A7Vc\nGQjzJiKG8moq0g0Pk4vNayYY5sdkgiYEHHOFIQ2/mIlTPSiOw+5sYuMyHBvl\nr1rs\r\n=NsZS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVRMWPX55yblkmNJXCMOIAMPu/d822bXKdl3f/6OpTDgIgSPF2szZB+Wt3nhXSKDufvrqyd3ODOmqXNhAP0D3A87g="}]},"_npmUser":{"name":"dcalvo","email":"dcalvo2@jhu.edu"},"directories":{},"maintainers":[{"name":"dcalvo","email":"dcalvo2@jhu.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/electron-routes_1.5.3_1627074182598_0.9768492598969003"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-20T19:06:44.392Z","1.4.0":"2021-07-20T19:06:44.618Z","modified":"2022-04-05T03:18:46.893Z","1.5.0":"2021-07-21T19:37:28.662Z","1.5.1":"2021-07-21T19:47:43.225Z","1.5.2":"2021-07-21T20:24:53.190Z","1.5.3":"2021-07-23T21:03:02.715Z"},"maintainers":[{"name":"dcalvo","email":"dcalvo2@jhu.edu"}],"description":"[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r [![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js","author":{"name":"David Calvo"},"license":"MIT","readme":"# electron-router\r\n\r\n[![Build Status](https://travis-ci.org/MarshallOfSound/electron-router.svg?branch=master)](https://travis-ci.org/MarshallOfSound/electron-router)\r\n[![npm version](https://badge.fury.io/js/%40marshallofsound%2Felectron-router.svg)](https://badge.fury.io/js/%40marshallofsound%2Felectron-router)\r\n[![npm](https://img.shields.io/npm/dm/electron-routes.svg)](https://www.npmjs.com/package/electron-routes)\r\n[![license](https://img.shields.io/github/license/MarshallOfSound/electron-router.svg?maxAge=2592000)](https://github.com/MarshallOfSound/electron-router/blob/master/LICENSE)\r\n![status](https://img.shields.io/badge/Status-%20Ready%20for%20Awesome-red.svg)\r\n\r\nUse an Express style API that you know and love without the security concerns and hassle of making it\r\nwork inside Electron.\r\n\r\n## Install\r\n\r\n```\r\n$ npm install --save electron-routes\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\n// Main Process\r\nimport { Router } from \"electron-routes\";\r\n\r\nconst api = new Router(\"myscheme\");\r\napi.get(\"foo\", (req, res) => {\r\n  res.json({\r\n    hello: \"world\",\r\n  });\r\n});\r\n\r\n// Renderer Process\r\nimport { rendererPreload } from \"electron-routes\";\r\n\r\nrendererPreload();\r\n\r\nfetch(\"myscheme://foo\")\r\n  .then((resp) => resp.json())\r\n  .then((o) => console.log(o)); // { hello: 'world' }\r\n```\r\n\r\n## API\r\n\r\n### Router(schemeName = 'app', schemePrivileges = { standard: true }, partitionName)\r\n\r\n`schemePrivileges` is the same structure as found in the [Electron docs](https://www.electronjs.org/docs/api/structures/custom-scheme).\r\n\r\n#### router.\\[method\\](pathPattern, handler)\r\n\r\n**NOTE:** method can be any standard HTTP method (`get`, `post`, `put`, `delete`)\r\n\r\nThis will set the handler function to be called whenever a path is requested that\r\nmathces the provided `pathPattern` and the request method is the same as `method`;\r\n\r\nThe `handler` function will be called with:\r\n\r\n- `request` - A [`Request`](#request) object\r\n- `response` - A [`Response`](#response) object\r\n- `next` - A function to tell `electron-router` to attempt the next handler\r\n\r\nNote, if you call `next` in all the handlers `electron-router` will automatically\r\nsend a 404 File Not Found error message.\r\n\r\n#### router.use(pathPattern, handler)\r\n\r\nIf `handler` is a function this will act in exactly the same way as the generic\r\n`method` function above. However, if the `handler` is a `MiniRouter` it will pass\r\nall requests that match the `pathPattern` through to the `MiniRouter`, but **only**\r\nafter all standard method handlers have been called on the current router.\r\n\r\nAll handlers on the current router will take precedence over handlers on a sub-router.\r\n\r\n### MiniRouter()\r\n\r\nMiniRouter has an identical API to the main [`Router`](#router) class. Just make\r\nsure you only use the main `Router` class for the top level router though, or bad\r\nthings will happen.\r\n\r\n### rendererPreload()\r\n\r\nThis method will enable the registered schemes to work with the `fetch` API and\r\nbypasses certain `CORS` errors that can occur. 99.99% of the time you will need\r\nto call this method.\r\n\r\n**NOTE:** It's probably a good idea to call it in a preload script\r\n\r\n### Request\r\n\r\n#### request.params\r\n\r\nAn object of all the URL params that resulted in this path being valid. E.g. The\r\npath `foo/:thing/hello` would match if you requsted `myscheme://foo/magical/hello`.\r\n\r\nIn this case `request.params` would be equal to:\r\n\r\n```js\r\nrequest.params = {\r\n  thing: \"magical\",\r\n};\r\n```\r\n\r\n#### request.method\r\n\r\nThe HTTP method that caused this request. Normally one of `get`, `post`, `put`\r\nor `delete`.\r\n\r\n#### referrer\r\n\r\n#### request.uploadData[]\r\n\r\nAn array of Electron's `uploadData` objects. They follow the same structure as\r\nfound in the [Electron docs](http://electron.atom.io/docs/api/structures/upload-data/)\r\nbut with two extra methods.\r\n\r\n##### request.uploadData.stringContent()\r\n\r\nAutomatically attempts to convert the `bytes` Buffer of the uploadData into a string\r\nand return it.\r\n\r\n##### request.uploadData.json()\r\n\r\nAutomatically attempts to convert the `bytes` Buffer of the uploadData into a\r\njavascript object and return it.\r\n\r\n### Response\r\n\r\n#### response.json(object)\r\n\r\nWill immediately terminate the request sending a stringified version of the object\r\nback to the client.\r\n\r\n#### response.send(string[, mimeType='text/html'])\r\n\r\nWill immediately terminate the request sending the string as the response text\r\nback to the client.\r\n\r\n#### response.notFound()\r\n\r\nWill immediately terminate the request with a 404 File Not Found response\r\n\r\n## License\r\n\r\nMIT ©\r\n","readmeFilename":"README.md","homepage":"https://github.com/dcalvo/electron-routes#readme","repository":{"url":"git+https://github.com/dcalvo/electron-routes.git"},"bugs":{"url":"https://github.com/dcalvo/electron-routes/issues"}}