File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,12 @@ function assert(options, password) {
5959
6060 let prevCode = password . charCodeAt ( 0 ) ;
6161 let seqLen = isAlphanumeric ( prevCode ) ? 1 : 0 ;
62- let direction = Direction . None ;
62+ let currentDirection = Direction . None ;
6363
6464 for ( let i = 1 ; i < password . length ; i ++ ) {
6565 const currentCode = password . charCodeAt ( i ) ;
6666 if ( ! isAlphanumeric ( currentCode ) || ! isAlphanumeric ( prevCode ) ) {
67- direction = Direction . None ;
67+ currentDirection = Direction . None ;
6868 seqLen = 1 ;
6969 prevCode = currentCode ;
7070 continue ;
@@ -74,15 +74,15 @@ function assert(options, password) {
7474 prevCode = currentCode ;
7575
7676 if ( diff === Direction . Ascending || diff === Direction . Descending ) {
77- if ( direction === diff ) {
77+ if ( currentDirection === diff ) {
7878 seqLen += 1 ;
7979 } else {
8080 // start a new potential sequence of length 2 (prev + current)
81- direction = diff ;
81+ currentDirection = diff ;
8282 seqLen = 2 ;
8383 }
8484 } else {
85- direction = Direction . None ;
85+ currentDirection = Direction . None ;
8686 seqLen = 1 ;
8787 }
8888
You can’t perform that action at this time.
0 commit comments