frontend/.pnpm-store/v3/files/d4/61de162f863a9094ca42c0ee1e3e86f98a81018f9503944a33a8740349e201fefeec3760f0868b12867312b32f14eda275250798d5e40c0d0c80b92f7e86e0

31 lines
644 B
Plaintext

export interface Option<V> {
id: number;
value: V;
minDiversity: number;
minLength: number;
}
export interface FirstOption<V> extends Option<V> {
minDiversity: 0;
minLength: 0;
}
export type Options<V> = [FirstOption<V>, ...Option<V>[]];
export const defaultOptions: Options<string>;
export type DiversityType = "lowercase" | "uppercase" | "symbol" | "number";
export interface Result<V> {
id: number;
value: V;
contains: DiversityType[];
length: number;
}
export function passwordStrength<V = string>(
password: string,
options?: Options<V>,
allowedSymbols?: string,
): Result<V>;