{"_id":"net-connect","_rev":"1022-43f00d7ae962807c0b120161f759c60f","name":"net-connect","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"net-connect","version":"1.0.0","license":"MIT","_id":"net-connect@1.0.0","maintainers":[{"name":"segment","email":"tj@segment.io"}],"homepage":"https://github.com/segmentio/net-connect","bugs":{"url":"https://github.com/segmentio/net-connect/issues"},"dist":{"shasum":"6c1d4e87901ba57eeb23ac5dc220c59242248d6b","tarball":"https://registry.npmjs.org/net-connect/-/net-connect-1.0.0.tgz","integrity":"sha512-Y+rwO+UtK6EG4IGdJShh5RncUrh3kemea0dJD7E4mUcoRILR0QyJoNjUhrBl4BH1ghUsa5t9tJSFOEybbnInaQ==","signatures":[{"sig":"MEYCIQCXYNAgeVu/PnkMCnuIYE6GQXS+LPqwOnMwTMXpHsU4PAIhAJhbR3HmGwJPFjUuk2tVnktxoImgWujpbv0bNqpvgvok","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_npmUser":{"name":"segment","email":"tj@segment.io"},"repository":{"url":"git://github.com/segmentio/net-connect","type":"git"},"_npmVersion":"1.3.22","description":"Make tcp connections by numbers, strings or objects","directories":{},"publishConfig":{"registry":"https://registry.npmjs.org"},"devDependencies":{"mocha":"~1.18.2"}},"1.0.1":{"name":"net-connect","version":"1.0.1","license":"MIT","_id":"net-connect@1.0.1","maintainers":[{"name":"segment","email":"tj@segment.io"}],"homepage":"https://github.com/segmentio/net-connect","bugs":{"url":"https://github.com/segmentio/net-connect/issues"},"dist":{"shasum":"4f7e7ba5ace0ec466ea81fdd584cdfa972db676c","tarball":"https://registry.npmjs.org/net-connect/-/net-connect-1.0.1.tgz","integrity":"sha512-SdcFEZvyy8R57LXGs+urmkQ4SHfSXk7550lHpC+dHjpfqkdTFvb4zpRcbGvoch/oMfoDit0nqWOZJr+kwmLQ3A==","signatures":[{"sig":"MEUCIQCKCYKuAoO85IzV2tGq46dOdRtkr6xqTHBeCge0+m6c8wIgOh1NG9Qu8zJeaUbE491L1yHOMtT6gIkMPd4U98BNWYs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"_from":".","_npmUser":{"name":"segment","email":"tj@segment.io"},"repository":{"url":"git://github.com/segmentio/net-connect","type":"git"},"_npmVersion":"1.3.22","description":"Make tcp connections with a convenient api","directories":{},"publishConfig":{"registry":"https://registry.npmjs.org"},"devDependencies":{"mocha":"~1.18.2"}}},"time":{"created":"2014-04-24T14:54:48.143Z","modified":"2026-06-11T22:37:56.102Z","1.0.0":"2014-04-24T14:54:48.143Z","1.0.1":"2014-04-24T15:00:04.822Z"},"bugs":{"url":"https://github.com/segmentio/net-connect/issues"},"license":"MIT","homepage":"https://github.com/segmentio/net-connect","repository":{"url":"git://github.com/segmentio/net-connect","type":"git"},"description":"Make tcp connections with a convenient api","maintainers":[{"email":"secure-supply-chain@twilio.com","name":"twilio-supply-chain"},{"email":"tools@segment.com","name":"segmentio"},{"email":"tools+npm@segment.com","name":"segment-admin"}],"readme":"\n[![Build Status](https://circleci.com/gh/segmentio/net-connect.png?circle-token=e9452b79ec91e7630f5a65e7be03fcdbddd5079d)](https://circleci.com/gh/segmentio/net-connect)\n\n# net-connect\n\n  Make tcp connections with a convenient api.\n\n## Example\n\n```js\nvar connect = require('net-connect');\n\n// port\nvar con = connect(1337);\n\n// \":port\"\nvar con = connect(':1337');\n\n// \"host:port\"\nvar con = connect('1.2.3.4:1337');\n\n// { host, port }\nvar con = connect({ host: '1.2.3.4', port: 1337 });\n\n// { address, port }\n// this is what you get from server.address()\nvar con = connect({ address: '1.2.3.4', port: 1337 });\n```\n\n## Installation\n\n```bash\n$ npm install net-connect\n```\n\n## API\n\n### connect(obj[, listener])\n\n  Create a tcp connection to the address specified by `obj`.\n\n  Optionally pass a `listener` fn to be called when the connection has been\n  established.\n\n### connect.parse(obj)\n\n  Parse `obj` and return a `{ host, port }` object. This is used internally\n  by `connect()`.\n\n## License\n\n  MIT\n\n","readmeFilename":"Readme.md"}