@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
1717 return to ;
1818} ;
1919var __toESM = ( mod , isNodeMode , target ) => ( target = mod != null ? __create ( __getProtoOf ( mod ) ) : { } , __copyProps (
20+ // If the importer is in node compatibility mode or this is not an ESM
21+ // file that has been converted to a CommonJS file using a Babel-
22+ // compatible transform (i.e. "__esModule" has not been set), then set
23+ // "default" to the CommonJS "module.exports" for node compatibility.
2024 isNodeMode || ! mod || ! mod . __esModule ? __defProp ( target , "default" , { value : mod , enumerable : true } ) : target ,
2125 mod
2226) ) ;
@@ -77,15 +81,13 @@ function* getEndpoints(argument, defaultPorts = DEFAULT_PORTS) {
7781 if ( ! Array . isArray ( ports ) || ports . length === 0 ) {
7882 ports = defaultPortList ;
7983 }
80- if ( ! host || ports . length === 0 )
81- return ;
84+ if ( ! host || ports . length === 0 ) return ;
8285 for ( const portChunk of ports ) {
8386 if ( portChunk . includes ( "-" ) ) {
8487 let [ fromPort , toPort ] = portChunk . split ( "-" ) ;
8588 fromPort = Math . max ( 1 , Math . abs ( parseInt ( fromPort , 10 ) ) ) ;
8689 toPort = Math . min ( 65535 , Math . abs ( parseInt ( toPort , 10 ) ) ) ;
87- if ( isNaN ( fromPort ) || isNaN ( toPort ) )
88- continue ;
90+ if ( isNaN ( fromPort ) || isNaN ( toPort ) ) continue ;
8991 if ( fromPort > toPort ) {
9092 [ fromPort , toPort ] = [ toPort , fromPort ] ;
9193 }
@@ -101,8 +103,7 @@ function* getEndpoints(argument, defaultPorts = DEFAULT_PORTS) {
101103
102104// src/one.js
103105var handleFail = ( resolve , socket ) => {
104- if ( socket && ! socket . destroyed )
105- socket . destroy ( ) ;
106+ if ( socket && ! socket . destroyed ) socket . destroy ( ) ;
106107 resolve ( false ) ;
107108} ;
108109var handleSuccess = ( resolve , socket ) => {
@@ -162,8 +163,7 @@ async function* tcpExistsMany(endpoints, options) {
162163 const chunk = [ ] ;
163164 for ( const item of getEndpoints ( endpoints , DEFAULT_PORTS ) ) {
164165 if ( chunk . push ( item ) === DEFAULT_CHUNK_SIZE ) {
165- if ( ( signal == null ? void 0 : signal . aborted ) === true )
166- return ;
166+ if ( ( signal == null ? void 0 : signal . aborted ) === true ) return ;
167167 yield await chunk_default ( chunk , {
168168 timeout,
169169 returnOnlyExisted,
@@ -172,8 +172,7 @@ async function* tcpExistsMany(endpoints, options) {
172172 chunk . length = 0 ;
173173 }
174174 }
175- if ( ( signal == null ? void 0 : signal . aborted ) === true )
176- return ;
175+ if ( ( signal == null ? void 0 : signal . aborted ) === true ) return ;
177176 yield await chunk_default ( chunk , { timeout, returnOnlyExisted, signal } ) ;
178177 chunk . length = 0 ;
179178 }
0 commit comments