Skip to content

Commit 09b3617

Browse files
committed
BREAKING CHANGE: return score
1 parent 9287748 commit 09b3617

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/types.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type ScoreOption = {
1414
export type CheckOptionResult = {
1515
checkedRules: CheckOption["name"][];
1616
value: ScoreOption["name"];
17+
score: ScoreOption["score"];
1718
length: number;
1819
};
1920

src/utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,6 @@ export const checkPasswordComplexity = (
8383
checkedRules,
8484
value: strength?.name || scoreOptions[0].name,
8585
length: password.length,
86+
score: strength?.score || scoreOptions[0].score,
8687
};
8788
};

0 commit comments

Comments
 (0)