File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const ipv4 = {
5151 `ipv4.generate() » IPv4 address${ options . qty > 1 ? 'es' : '' } generated!` ) ;
5252 if ( options . qty === 1 ) console . info (
5353 `ipv4.generate() » ${ ipResult } ` ) ;
54- else if ( typeof require ! == 'undefined' && ! require . main . filename . endsWith ( 'cli.js' ) ) console . info (
54+ else if ( typeof require == 'undefined' || ! require . main . filename . endsWith ( 'cli.js' ) ) console . info (
5555 'ipv4.generate() » Check returned array.' ) ;
5656 }
5757 return ipResult ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function generatePassword(options = {}) {
8989 if ( options . verbose && ! fromGeneratePasswords ) {
9090 console . info (
9191 'generatePassword() » Password generated!' ) ;
92- if ( typeof require ! == 'undefined' && ! require . main . filename . endsWith ( 'cli.js' ) ) console . info (
92+ if ( typeof require == 'undefined' || ! require . main . filename . endsWith ( 'cli.js' ) ) console . info (
9393 'generatePassword() » Check returned string.' ) ;
9494 }
9595 return password ;
@@ -128,7 +128,7 @@ function generatePasswords(qty, options = {}) {
128128 // Log/return final result
129129 if ( options . verbose ) console . info (
130130 `generatePasswords() » Password${ qty > 1 ? 's' : '' } generated!` ) ;
131- if ( typeof require ! == 'undefined' && ! require . main . filename . endsWith ( 'cli.js' ) ) console . info (
131+ if ( typeof require == 'undefined' || ! require . main . filename . endsWith ( 'cli.js' ) ) console . info (
132132 'generatePasswords() » Check returned array.' ) ;
133133 return passwords ;
134134}
You can’t perform that action at this time.
0 commit comments