UNPKG

zxcvbn3

Version:

realistic password strength estimation

20 lines (19 loc) 1.04 kB
/** * returns the six adjacent coordinates on a standard keyboard, where each row is slanted to the * right from the last. adjacencies are clockwise, starting with key to the left, then two keys * above, then right key, then two keys below. (that is, only near-diagonal keys are adjacent, * so g's coordinate is adjacent to those of t,y,b,v, but not those of r,u,n,c.) */ export declare function get_slanted_adjacent_coords(x: any, y: any): any[][]; /** * returns the nine clockwise adjacent coordinates on a keypad, where each row is vert aligned. */ export declare function get_aligned_adjacent_coords(x: any, y: any): any[][]; /** * builds an adjacency graph as a dictionary: {character: [adjacent_characters]}. * adjacent characters occur in a clockwise order. * for example: * on qwerty layout, 'g' maps to ['fF', 'tT', 'yY', 'hH', 'bB', 'vV'] * on keypad layout, '7' maps to [None, None, None, '=', '8', '5', '4', None] */ export declare function build_graph(layout_str: string, slanted: boolean): {};