{"_id":"endpoint-utils","_rev":"9-dac99779ab22ba2d79ec73fcef89eab3","name":"endpoint-utils","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","dist-tags":{"latest":"1.0.2","preview":"1.0.4-preview"},"versions":{"1.0.0":{"name":"endpoint-utils","version":"1.0.0","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","dependencies":{"pinkie-promise":"^1.0.0"},"devDependencies":{"ip":"^1.0.1","mocha":"^2.3.3"},"files":["index.js"],"gitHead":"812dc3a1d90bfd1a6b75c0e2247425720731fabc","_id":"endpoint-utils@1.0.0","_shasum":"6b62bbbb0373327571ff810272a043fcd469fcb3","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"dist":{"shasum":"6b62bbbb0373327571ff810272a043fcd469fcb3","tarball":"https://registry.npmjs.org/endpoint-utils/-/endpoint-utils-1.0.0.tgz","integrity":"sha512-ACGxrdwluxqfzcYa03No5RGkFppZCyMATLs8nhVBbMkMz1C27bTg0KzeVi5hD4pGmhM4wLwaYz/1WTPMKsHHmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGZD65zZkKtHBzux6utW/va++Ni4tCeZZyEl5qwdkXRwAiEA07BYtMEHsQZpsv60fS7pJbACGIKPUcOvwDeaoMN+AJ0="}]},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}]},"1.0.1":{"name":"endpoint-utils","version":"1.0.1","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","dependencies":{"pinkie-promise":"^1.0.0","ip":"^1.0.1"},"devDependencies":{"mocha":"^2.3.3"},"files":["index.js"],"gitHead":"66f558d03f76e87734e83830e2fb524d1a4b8fb0","_id":"endpoint-utils@1.0.1","_shasum":"23b8cd9c593f626507087fd6d1f7460055536091","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"23b8cd9c593f626507087fd6d1f7460055536091","tarball":"https://registry.npmjs.org/endpoint-utils/-/endpoint-utils-1.0.1.tgz","integrity":"sha512-INh4zAGUsrfnGR/BQOY3yXfH2uaYMqnWnNkHbc2VUSP/g/3vwvkHM3UTUYDfC7F4hyV4XRe+6Bng5ImCnH2Dxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTHuI+FBkwqjVm8DmrNLrpenHTUVL7pD+u5uRV2ZeHCAiEAqkt5mkk9tChOjlYwqZ6ZV8BO4/er7oD5E6HGXK5reg4="}]}},"1.0.2-preview":{"name":"endpoint-utils","version":"1.0.2-preview","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","dependencies":{"pinkie-promise":"^1.0.0","ip":"^1.0.1"},"devDependencies":{"mocha":"^2.3.3"},"files":["index.js"],"gitHead":"15224987e947e4b8cd1d2382313c13f7b67ebdbe","_id":"endpoint-utils@1.0.2-preview","_shasum":"479804928c14d779a70203d0560a5e64428af485","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"479804928c14d779a70203d0560a5e64428af485","tarball":"https://registry.npmjs.org/endpoint-utils/-/endpoint-utils-1.0.2-preview.tgz","integrity":"sha512-cfd1H2IH4yu6vVvo4Fb/aQ3t/fyX4TFrzL78wG6VSvG7VMctOxhnTpWwVUvfZQxju39h08wZM9UaudWBO2INGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7LmhglRbJUoEbl4F1BxaZY1bIx53k7UD5BcO85ZhykAiEAm9yhB4H2UCHg8eFf82eJTlpTq7kA8EJGH+Lbl6oVxXs="}]}},"1.0.3-preview":{"name":"endpoint-utils","version":"1.0.3-preview","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","dependencies":{"pinkie-promise":"^1.0.0","ip":"^1.0.1"},"devDependencies":{"mocha":"^2.3.3"},"files":["index.js"],"gitHead":"b1c68098f29c8066048b697b0e0a0c284a406da6","_id":"endpoint-utils@1.0.3-preview","_shasum":"9d447a69d54043fef8ec56e035bf59edda63568b","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"9d447a69d54043fef8ec56e035bf59edda63568b","tarball":"https://registry.npmjs.org/endpoint-utils/-/endpoint-utils-1.0.3-preview.tgz","integrity":"sha512-dd/J3op7DTSDk0wInMjUtoTmc+oij8z6VKZKNV2G5d/NtcYCX/LNcCqWOP7RkwSGa1GmE0u9vH96hMQNTeAFFA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkHmC6gzRlXXpxdeUQXG9lsgdsg7oinco503mhrwyoVgIgEOMB/Yum3mZNy3hVHE5fiRKeBt5POSx71Nvx+Zprpvw="}]}},"1.0.4-preview":{"name":"endpoint-utils","version":"1.0.4-preview","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","dependencies":{"pinkie-promise":"^1.0.0","ip":"^1.0.1"},"devDependencies":{"mocha":"^2.3.3"},"files":["index.js"],"gitHead":"89c4394ddbd56566b2d845cb5a24ee349e35d846","_id":"endpoint-utils@1.0.4-preview","_shasum":"2ece7cc0aaf2e560d7530163660e511de85c68a5","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"2ece7cc0aaf2e560d7530163660e511de85c68a5","tarball":"https://registry.npmjs.org/endpoint-utils/-/endpoint-utils-1.0.4-preview.tgz","integrity":"sha512-evcTKKqC/O7UGW/NgBedfQzD2Tl4gQQINmObPEH5iYqNPe5HjTLvY/6MvwFAF/eIYl3aM2yLTukCR+wL90lwsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdOfulKBfHc9uQDGFxNFfPugXuRpgZ+ud8J9ppJc98zAIhANRHkO9bt1yvohWMxGZ3+4KsTf2+5JGo92DpS1dShsUI"}]}},"1.0.2":{"name":"endpoint-utils","version":"1.0.2","description":"Utils to deal with TCP ports and hostnames. Safe for everyday use.","main":"index.js","scripts":{"test":"mocha","publish-please":"publish-please","prepublish":"publish-please guard"},"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","dependencies":{"ip":"^1.1.3","pinkie-promise":"^1.0.0"},"devDependencies":{"mocha":"^2.3.3","publish-please":"^2.1.4"},"files":["index.js"],"gitHead":"28b750dcdce5e0c5b9d82d51b3f8f25fa9e07942","_id":"endpoint-utils@1.0.2","_shasum":"0808c3369a727cd7967a39ff34ebc926b88146a8","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"dist":{"shasum":"0808c3369a727cd7967a39ff34ebc926b88146a8","tarball":"https://registry.npmjs.org/endpoint-utils/-/endpoint-utils-1.0.2.tgz","integrity":"sha512-s5IrlLvx7qVXPOjcxjF00CRBlybiQWOoGCNiIZ/Vin2WeJ3SHtfkWHRsyu7C1+6QAwYXf0ULoweylxUa19Khjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9C2ykXOif+DUdIJbXeAFUfOqGIk/Xk67nxoiof6JSsAiEAnE1pkja4YT98AxSnXT6eZTepOYT5+H+GwdR9JUh1bRI="}]},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/endpoint-utils-1.0.2.tgz_1467195590307_0.6794634298421443"}}},"readme":"# endpoint-utils\n[![Build Status](https://api.travis-ci.org/inikulin/endpoint-utils.svg)](https://travis-ci.org/inikulin/endpoint-utils)\n\n*Utils to deal with TCP ports and hostnames. Safe for everyday use.*\n\n## Install\n```\nnpm install endpoint-utils\n```\n\n## Usage\n### Get free port\n```js\nconst getFreePort = require('endpoint-utils').getFreePort;\n\ngetFreePort().then(port => {\n    console.log(port);\n    //> 1337\n});\n```\n\n### Get multiple free ports\n```js\nconst getFreePorts = require('endpoint-utils').getFreePorts;\n\ngetFreePorts(3).then(ports => {\n    console.log(ports);\n    //> [1337, 1338, 1339]\n});\n```\n\n### Check if port is free\n```js\nconst isFreePort = require('endpoint-utils').isFreePort;\n\nisFreePort(1337).then(isFree => {\n    console.log(isFree);\n    //> true\n});\n```\n\n### Check if hostname or IP address resolves to the current machine\n```js\nconst isMyHostname = require('endpoint-utils').isMyHostname;\n\nisMyHostname('inikulin').then(isMy => {\n    console.log(isMy);\n    //> true\n});\n\nisMyHostname('172.22.5.80').then(isMy => {\n    console.log(isMy);\n    //> true\n});\n```\n\n### Get hostname or IP address which can be resolved to the current machine\n```js\nconst getMyHostname = require('endpoint-utils').getMyHostname;\n\ngetMyHostname().then(hostname => {\n    console.log(hostname);\n    //> \"inikulin.local\"\n});\n```\n\n### Get IP address of current machine\n```js\nconst getIPAddress = require('endpoint-utils').getIPAddress;\n\nconsole.log(getIPAddress());\n//> \"172.22.5.80\"\n```\n\n## Author\n[Ivan Nikulin](https://github.com/inikulin) (ifaaan@gmail.com)\n","maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"time":{"modified":"2022-06-17T05:12:33.211Z","created":"2015-10-14T12:23:52.664Z","1.0.0":"2015-10-14T12:23:52.664Z","1.0.1":"2015-10-29T20:30:03.858Z","1.0.2-preview":"2015-12-08T12:22:30.712Z","1.0.3-preview":"2015-12-08T13:24:26.162Z","1.0.4-preview":"2015-12-08T13:34:59.280Z","1.0.2":"2016-06-29T10:19:52.940Z"},"homepage":"https://github.com/inikulin/endpoint-utils#readme","keywords":["free","port","get","check","tcp","server","http","host","hostname","mine"],"repository":{"type":"git","url":"git+https://github.com/inikulin/endpoint-utils.git"},"author":{"name":"Ivan Nikulin","email":"ifaaan@gmail.com"},"bugs":{"url":"https://github.com/inikulin/endpoint-utils/issues"},"license":"MIT","readmeFilename":"README.md","users":{"fengmiaosen":true}}