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 @@ -23,6 +23,7 @@ class RadixTree {
2323 }
2424
2525 searchForNodes ( word ) {
26+ let found = false ;
2627 const iterObject = ( nodes , initialValue ) => {
2728 return Object . keys ( nodes ) . reduce ( ( r , key ) => {
2829 if ( key === 'isword' && r === word ) {
@@ -33,7 +34,6 @@ class RadixTree {
3334 } , initialValue ) ;
3435 }
3536
36- let found = false ;
3737 iterObject ( this . nodes , '' ) ;
3838 return found ;
3939 }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const isStupid = (userPasswordInputString) => {
1010 const userHashedPassword = crypto . createHash ( 'sha1' ) . update ( userPassword ) . digest ( 'hex' ) ;
1111
1212 return passwordTree . searchForNodes ( userHashedPassword ) ;
13- }
13+ } ;
1414
1515exports . isStupid = isStupid ;
1616exports . isOneOfThem = isStupid ;
@@ -33,4 +33,4 @@ exports.rateOfUsage = (userPasswordInputString) => {
3333 frequency : 0 ,
3434 message : 'The password is not part of the list'
3535 } ;
36- }
36+ } ;
You can’t perform that action at this time.
0 commit comments