@zxcvbn-ts/core
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -1,2 +0,2 @@ | ||
import { MatchExtended } from '../types'; | ||
import { MatchExtended, MatchEstimated } from '../types'; | ||
declare const _default: { | ||
@@ -7,3 +7,3 @@ mostGuessableMatchSequence(password: string, matches: MatchExtended[], excludeAdditive?: boolean): { | ||
guessesLog10: number; | ||
sequence: MatchExtended[]; | ||
sequence: MatchEstimated[]; | ||
}; | ||
@@ -10,0 +10,0 @@ getGuesses(password: string, optimalSequenceLength: number): number; |
{ | ||
"name": "@zxcvbn-ts/core", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"main": "dist/index.js", | ||
@@ -37,3 +37,3 @@ "module": "dist/index.esm.js", | ||
], | ||
"gitHead": "e6153b220f7f42a1921240455db9df1313c557de" | ||
"gitHead": "36056742843d30eef24dabe36b960856a9cf9380" | ||
} |
@@ -7,3 +7,3 @@ import Matching from './Matching' | ||
import debounce from './debounce' | ||
import { MatchEstimated, MatchExtended, ZxcvbnResult } from './types' | ||
import { MatchExtended, ZxcvbnResult } from './types' | ||
@@ -30,6 +30,3 @@ const time = () => new Date().getTime() | ||
...attackTimes, | ||
feedback: feedback.getFeedback( | ||
attackTimes.score, | ||
matchSequence.sequence as MatchEstimated[], | ||
), | ||
feedback: feedback.getFeedback(attackTimes.score, matchSequence.sequence), | ||
} | ||
@@ -36,0 +33,0 @@ } |
import utils from './utils' | ||
import estimateGuesses from './estimate' | ||
import { MIN_GUESSES_BEFORE_GROWING_SEQUENCE } from '../data/const' | ||
import { MatchExtended, BruteForceMatch } from '../types' | ||
import { MatchExtended, BruteForceMatch, MatchEstimated } from '../types' | ||
@@ -99,3 +99,3 @@ const scoringHelper = { | ||
unwind(passwordLength: number) { | ||
const optimalMatchSequence: MatchExtended[] = [] | ||
const optimalMatchSequence: MatchEstimated[] = [] | ||
let k = passwordLength - 1 | ||
@@ -118,3 +118,3 @@ // find the final best sequence length and score | ||
while (k >= 0) { | ||
const match: MatchExtended = this.optimal.m[k][sequenceLength] | ||
const match: MatchEstimated = this.optimal.m[k][sequenceLength] | ||
optimalMatchSequence.unshift(match) | ||
@@ -121,0 +121,0 @@ k = match.i - 1 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
592485
9769