{"_id":"freeport-async","_rev":"71-8917a6815e41154bc2309431742824a9","name":"freeport-async","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"freeport-async","version":"1.0.0","keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"exponent.team@gmail.com"},"_id":"freeport-async@1.0.0","maintainers":[{"name":"exponent","email":"exponent.team@gmail.com"}],"homepage":"https://gist.github.com/mikeal/1840641","bugs":{"url":"https://github.com/650Industries/freeport/issues"},"dist":{"shasum":"36a4a7e97e5828e8523aa4cc408e297b1a43488b","tarball":"https://registry.npmjs.org/freeport-async/-/freeport-async-1.0.0.tgz","integrity":"sha512-kvaXxlqgln6IbdlrB9LPH0xjWXHOHrONBPthUfQiGDy8S342DTotWzRHm84ZPJZDCK6MRPQLqn8GjUkW/68AyA==","signatures":[{"sig":"MEUCIQDkSkyDGb198EgNDZF2f0xdyoG911w/I5nxYI/R+NyE/QIgaCagsAcj4F1NSZ1v4bm+I7hOA9oCo/hnqj2JjlJ9+Rg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"36a4a7e97e5828e8523aa4cc408e297b1a43488b","gitHead":"2a3c840a067e2c53ed6bcc517009e52978559667","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"exponent","email":"exponent.team@gmail.com"},"repository":{"url":"git+https://github.com/650Industries/freeport.git","type":"git"},"_npmVersion":"2.8.4","description":"Uses mikeal's code to find an open port in a given range","directories":{},"_nodeVersion":"1.8.1"},"1.1.0":{"name":"freeport-async","version":"1.1.0","keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"exponent.team@gmail.com"},"_id":"freeport-async@1.1.0","maintainers":[{"name":"exponent","email":"exponent.team@gmail.com"}],"homepage":"https://gist.github.com/mikeal/1840641","bugs":{"url":"https://github.com/650Industries/freeport/issues"},"dist":{"shasum":"a9bbaa8e1a0a8bad613e9425d50930627ea1569f","tarball":"https://registry.npmjs.org/freeport-async/-/freeport-async-1.1.0.tgz","integrity":"sha512-dfqOSadNpCP3ChubgEYy/5g/sPDu5hACpMkscOvmFTY58y35eb2o/0HxTOe1tAkpaRzWwGAVwtCFY4BxwrV9ZQ==","signatures":[{"sig":"MEYCIQCY1aszDOIeI/QtnQh2rqitAWmAUtYjCPABk3Ouz/2x2wIhAIFHNepMkZNIRdOz4yobpHDn6/FaWpDTi2OFdye9kgfo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"a9bbaa8e1a0a8bad613e9425d50930627ea1569f","gitHead":"cb428668a6fef918d23e251ff8cc6149f7c6c786","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"exponent","email":"exponent.team@gmail.com"},"repository":{"url":"git+https://github.com/650Industries/freeport.git","type":"git"},"_npmVersion":"2.9.0","description":"Uses mikeal's code to find an open port in a given range","directories":{},"_nodeVersion":"2.0.1"},"1.1.1":{"name":"freeport-async","version":"1.1.1","keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"exponent.team@gmail.com"},"_id":"freeport-async@1.1.1","maintainers":[{"name":"exponent","email":"exponent.team@gmail.com"}],"homepage":"https://gist.github.com/mikeal/1840641","bugs":{"url":"https://github.com/650Industries/freeport/issues"},"dist":{"shasum":"5c8cf4fc1aba812578317bd4d7a1e5597baf958e","tarball":"https://registry.npmjs.org/freeport-async/-/freeport-async-1.1.1.tgz","integrity":"sha512-M6dG2HJswd4XI3KxbgvZmRG/j/32xyTpI0PiwrwkOuvTjU9xArkczgBjm02LnQPV1cSfyz5N1EIT9pGLNJNhhQ==","signatures":[{"sig":"MEUCIQCa2iv9VU53L/eYIeBB2xFWPh40rqomQrBJD1uYsO+WjgIgU51t7KVHZLeWVw0rX3/5jZ3xTWGAMXDIySgfMKry1Qc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"5c8cf4fc1aba812578317bd4d7a1e5597baf958e","gitHead":"1939cf7c1883c4f68b02da7a9970535141442015","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"exponent","email":"exponent.team@gmail.com"},"repository":{"url":"git+https://github.com/650Industries/freeport.git","type":"git"},"_npmVersion":"3.10.8","description":"Uses mikeal's code to find an open port in a given range","directories":{},"_nodeVersion":"6.9.1","_npmOperationalInternal":{"tmp":"tmp/freeport-async-1.1.1.tgz_1484199308143_0.018752024974673986","host":"packages-18-east.internal.npmjs.com"}},"2.0.0":{"name":"freeport-async","version":"2.0.0","keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"Expo"},"license":"MIT","_id":"freeport-async@2.0.0","maintainers":[{"name":"bbarthec","email":"bartlomiejbukowski.b@gmail.com"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"ccheever","email":"ccheever@gmail.com"},{"name":"charliecruzan","email":"charliecruzan@gmail.com"},{"name":"dsokal","email":"dominiksokal@gmail.com"},{"name":"esamelson","email":"eric@expo.io"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expoadmin","email":"support@expo.io"},{"name":"exponent","email":"exponent.team@gmail.com"},{"name":"fson","email":"ville.immonen@iki.fi"},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"mczernek","email":"czernekmichal@gmail.com"},{"name":"quinlanj","email":"quinlanjung@gmail.com"},{"name":"sjchmiela","email":"sjchmiela@gmail.com"},{"name":"szymon20000","email":"szymon.kapala@swmansion.com"},{"name":"tcdavis","email":"tc@expo.io"},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wkozyra","email":"wojciech.kozyra@swmansion.com"}],"homepage":"https://github.com/expo/freeport-async/blob/master/README.md","bugs":{"url":"https://github.com/expo/freeport-async/issues"},"dist":{"shasum":"6adf2ec0c629d11abff92836acd04b399135bab4","tarball":"https://registry.npmjs.org/freeport-async/-/freeport-async-2.0.0.tgz","fileCount":6,"integrity":"sha512-K7od3Uw45AJg00XUmy15+Hae2hOcgKcmN3/EF6Y7i01O0gaqiRx8sUSpsb9+BRNL8RPBrhzPsVfy8q9ADlJuWQ==","signatures":[{"sig":"MEQCIELpdVdXyZgvlYFgJgaqIK+CHLhcOSKbwRoOBT/5VxC2AiBG+TKzyru7mR/jntDdNGQ7a6gwYeUxCjx64QrNNIxHbw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoNl/CRA9TVsSAnZWagAAO0IP/RLJVrKxYXcLuruTzH5w\n+m6n7L54U/ofDFCeRp2rOMbtTFmxrV3FGhbPlYQGfY3BPfXtuzM9CNYtDq25\nYIaGyPK7PlHAmic9zYfkRrpwyOXew6qCnMhkXEs05bznDVf+qRYrY/I2yAob\nBIQyDX97Dd2T4XG84XCmcQ//TYL4Pa2gEfgr5YITnNQU8euEZ5QvBpJa1DdR\n5RZKbTFU17oglwIgH2BG2AjoK/pzrR4KTepWQ4dJiN3GVUFg6PqkN2inXkKi\nxu1Yzsm+Lza1DwyDAmhsYKCpXUq8C8nLLDQiIRWWA3TU3g3v+6s/lXMZ2h3e\nhERJWZka4GPMXYxoX7utLlgL6srfKUiohD3emnGS/M4QMM+NZIoJjr+ficeM\nX+NHYv55qQWSTbx8ZAb+5Z1EIx0pBCcKJGF0pwzuEydvYSAKoqzLVeO8avOR\ntTUKGVxTZslaITmqwX44oOK9Se+UD6/64sLypJRwrot259pC6yXPs4mDmrEq\nLCTXD05WUIoF0rUIkehv9CDAgI595KkQiFsZyrCCocQ6+V1m4OtcUgWNi7oU\nkyzwvaY6qz4spO1RmDqHKnR7i/32fxuAIIZU5UdlEyKBAn/vXqaEgz/ghnMi\nGTgc25awAxp3RF2PYPZrPI0ZBLCLfJqU5PighQMi3xkBTFni+1rHUw9Z6nl4\n1Vt2\r\n=szeV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","engines":{"node":">=8"},"gitHead":"b6274f5f0f4a90eeb1e2f67321de3a064f313d92","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"fson","email":"ville.immonen@iki.fi"},"repository":{"url":"git+https://github.com/expo/freeport-async.git","type":"git"},"_npmVersion":"6.4.1","description":"Finds an available port for your application to use.","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"devDependencies":{"project-repl":"^1.5.0"},"_npmOperationalInternal":{"tmp":"tmp/freeport-async_2.0.0_1570822526858_0.8390358449103754","host":"s3://npm-registry-packages"}}},"time":{"created":"2015-05-12T12:42:44.060Z","modified":"2026-04-01T20:57:53.241Z","1.0.0":"2015-05-12T12:42:44.060Z","1.1.0":"2015-05-14T12:46:41.111Z","1.1.1":"2017-01-12T05:35:09.988Z","2.0.0":"2019-10-11T19:35:26.996Z"},"bugs":{"url":"https://github.com/expo/freeport-async/issues"},"author":{"name":"Expo"},"license":"MIT","homepage":"https://github.com/expo/freeport-async/blob/master/README.md","keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"repository":{"url":"git+https://github.com/expo/freeport-async.git","type":"git"},"description":"Finds an available port for your application to use.","maintainers":[{"email":"ide+npm@jameside.com","name":"ide"},{"email":"brentvatne@gmail.com","name":"brentvatne"},{"email":"baconbrix@gmail.com","name":"evanbacon"},{"email":"support@expo.io","name":"expoadmin"},{"email":"exponent.team@gmail.com","name":"exponent"},{"email":"me@bycedric.com","name":"bycedric"},{"email":"ckchien@gmail.com","name":"kudochien"},{"email":"hughesno1@gmail.com","name":"alanhughes"},{"email":"npm@tsapeta.com","name":"tsapeta"},{"email":"brent+expobotnpm@expo.io","name":"expo-bot"},{"email":"phil@kitten.sh","name":"philpl"},{"email":"wschurman@gmail.com","name":"wschurman"}],"readme":"# freeport-async\n\nFinds an available port for your application to use.\nYou can specify a range where to look for an available port.\nAnd can also find a range of available ports for you to use.\nYou can also be used to test to see if a given port is available.\n\nAll functions are async and return Promises.\n\n## Usage\n\n### Basic\n\n```js\nlet freeportAsync = require(\"freeport-async\");\n\nlet portICanUse = await freeportAsync();\n```\n\n### Advanced\n\n```js\nlet freeportAsync = require(\"freeport-async\");\n\nlet portIn9000Range = await freeportAsync(9000);\n\nlet portAvailableForAnyOrLocalhost = await freeportAsync(9000, {\n  hostnames: [null, \"localhost\"]\n});\n\nlet isPort5000Available = await freeportAsync.availableAsync(5000);\n\nlet listOf5ConsecutiveAvailablePorts = await freeportAsync.rangeAsync(5);\n\nlet freeRangeIn12000Range = await freeportAsync.rangeAsync(3, 12000);\n```\n\n## Important Note\n\nNote that this code just finds available ports, but doesn't reserve them in any way.\nThis means that if you have other code that might be looking for a port in the same range at the same time, you could run into issues.\n\nAlso, if you call `freeportAsync` twice in a row, it will often return the same port number twice. If you want to find two (or more) ports you can use, you need to call `freeportAsync.rangeAsync(<number-of-ports>, [startSearchFrom])`.\n\nSee also https://gist.github.com/mikeal/1840641\n","readmeFilename":"README.md"}