{"_id":"local-access","_rev":"902109","name":"local-access","description":"Retrieve formatted URL addresses for local and LAN access.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"time":{"modified":"2021-09-20T12:28:15.000Z","created":"2017-07-21T20:34:37.712Z","1.1.0":"2020-11-16T21:09:02.305Z","1.0.1":"2018-04-19T05:14:09.348Z","1.0.0":"2017-07-21T20:34:37.712Z"},"users":{},"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"repository":{"type":"git","url":"git+https://github.com/lukeed/local-access.git"},"versions":{"1.1.0":{"version":"1.1.0","name":"local-access","repository":{"type":"git","url":"git+https://github.com/lukeed/local-access.git"},"description":"Retrieve formatted URL addresses for local and LAN access.","module":"index.mjs","types":"index.d.ts","main":"index.js","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=6"},"scripts":{"build":"bundt","test":"uvu -r esm test"},"keywords":["ip","url","format","address","network","local","lan"],"devDependencies":{"bundt":"1.1.1","esm":"3.2.25","uvu":"0.4.1"},"gitHead":"05c724f6923647cf768fd8cb1431cdb6b903ef26","bugs":{"url":"https://github.com/lukeed/local-access/issues"},"homepage":"https://github.com/lukeed/local-access#readme","_id":"local-access@1.1.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"shasum":"e007c76ba2ca83d5877ba1a125fc8dfe23ba4798","size":2308,"noattachment":false,"key":"/local-access/-/local-access-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/local-access/download/local-access-1.1.0.tgz"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"directories":{},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/local-access_1.1.0_1605560942072_0.45365664207049083"},"_hasShrinkwrap":false,"publish_time":1605560942305,"_cnpm_publish_time":1605560942305},"1.0.1":{"name":"local-access","version":"1.0.1","description":"Retrieve formatted URL addresses for local and LAN access.","repository":{"type":"git","url":"git+https://github.com/lukeed/local-access.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"test":"tape test/*.js | tap-spec"},"files":["index.js"],"keywords":["ip","url","format","address","network","local","lan"],"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.7.0"},"gitHead":"7c3390efb3d2deb9cf82b8ac85526243f56ccc62","bugs":{"url":"https://github.com/lukeed/local-access/issues"},"homepage":"https://github.com/lukeed/local-access#readme","_id":"local-access@1.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"5121258146d64e869046c642ea4f1dd39ff942bb","size":2055,"noattachment":false,"key":"/local-access/-/local-access-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/local-access/download/local-access-1.0.1.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/local-access_1.0.1_1524114849242_0.17553280733868837"},"_hasShrinkwrap":false,"publish_time":1524114849348,"_cnpm_publish_time":1524114849348},"1.0.0":{"name":"local-access","version":"1.0.0","description":"Retrieve formatted URL addresses for local and LAN access.","repository":{"type":"git","url":"git+https://github.com/lukeed/local-access.git"},"license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"lukeed.com"},"engines":{"node":">=6"},"scripts":{"test":"tape test/*.js | tap-spec"},"files":["index.js"],"keywords":["ip","url","format","address","network","local","lan"],"dependencies":{"ip":"^1.1.5"},"devDependencies":{"tap-spec":"^4.1.1","tape":"^4.7.0"},"gitHead":"dce87ce13aff6c8460df11e8ab7480425d6cdbb0","bugs":{"url":"https://github.com/lukeed/local-access/issues"},"homepage":"https://github.com/lukeed/local-access#readme","_id":"local-access@1.0.0","_shasum":"f8b4fb2eb2da1e21fdfb58122ddd29dd61421125","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"dist":{"shasum":"f8b4fb2eb2da1e21fdfb58122ddd29dd61421125","size":1956,"noattachment":false,"key":"/local-access/-/local-access-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/local-access/download/local-access-1.0.0.tgz"},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/local-access-1.0.0.tgz_1500669277639_0.355718917446211"},"directories":{},"publish_time":1500669277712,"_hasShrinkwrap":false,"_cnpm_publish_time":1500669277712}},"readme":"# local-access [![CI](https://github.com/lukeed/local-access/workflows/CI/badge.svg)](https://github.com/lukeed/local-access/actions?query=workflow%3ACI) [![codecov](https://badgen.net/codecov/c/github/lukeed/local-access)](https://codecov.io/gh/lukeed/local-access)\n\n> Retrieve formatted URL addresses for local and LAN access.\n\n\n## Install\n\n```\n$ npm install local-access --save-dev\n```\n\n\n## Usage\n\n```js\nimport localAccess from 'local-access';\n// or\nconst localAccess = require('local-access');\n\nlocalAccess();\n//=> { local:'http://localhost:8080', network:'http://10.0.0.3:8080' }\n\nlocalAccess({ https:true, port:3000 });\n//=> { local:'https://localhost:3000', network:'https://10.0.0.3:3000' }\n\nlocalAccess({ pathname:'foo/bar' });\n//=> { local:'http://localhost:8080/foo/bar', network:'http://10.0.0.3:8080/foo/bar' }\n```\n\n\n## API\n\n### localAccess(options)\n\nParsing and formatting is controlled by [`url.format`](https://nodejs.org/api/url.html#url_url_format_urlobject), which means its `options` are inherited.\n\n#### options\n\nType: `Object`\n\nA [`URL`](https://nodejs.org/api/url.html#url_the_whatwg_url_api) instance, or _any_ object with matching keys.\n\n#### options.https\n\nType: `Boolean`<br>\nDefault: `false`\n\nShortcut for determining the `options.protocol` value.\n\n> **Note:** This is the only config value unique to `local-access`!\n\n#### options.hostname\n\nType: `String`<br>\nDefault: `'localhost'`\n\nSame as [`urlObject.hostname`](https://nodejs.org/api/url.html#url_urlobject_hostname) -- added a default value.\n\n#### options.port\n\nType: `Number` or `String`<br>\nDefault: `process.env.PORT || 8080`\n\nSame as [`urlObject.port`](https://nodejs.org/api/url.html#url_urlobject_port) -- added a default value.\n\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","_attachments":{},"homepage":"https://github.com/lukeed/local-access#readme","bugs":{"url":"https://github.com/lukeed/local-access/issues"},"license":"MIT"}