You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,23 +36,25 @@ This is the main function that outputs the user's typing pattern as a `String`
36
36
37
37
**Returns**: A typing pattern in `String` form
38
38
39
-
**optionsObject**: An object of the following form {type:Number, text:String, textId:Number, length: Number, extended:Boolean, targetId:String, caseSensitive:Boolean}. Detail table below.
39
+
**optionsObject**: An object of the following form {type:Number, text:String, textId:Number, length: Number, targetId:String, caseSensitive:Boolean}. Detail table below.
40
40
41
41
| Param | Type | Description |
42
42
| --- | --- | --- |
43
-
|**type**|`Number`|`0 for anytext pattern` (when you compare random typed texts of usually 120-180 chars long) <br> `1 for diagram pattern` (recommended in most cases, for emails, passwords, phone numbers, credit cards, short texts) |
44
-
|**text**|`String`| (Only for type 1) a typed string that you want the typing pattern for |
45
-
|**textId**|`Number`| (Optional, only for type 1) a personalized id for the typed text |
43
+
|**type**|`Number`|`0 for anytext pattern` (when you compare random typed texts of usually 120-180 chars long) <br> `1 for sametext pattern` (also called diagram pattern, recommended in most cases, for emails, passwords, phone numbers, credit cards, short texts)<br> ` 2 for extended pattern` (most versatile, can replace both anytext and sametext patterns) |
44
+
|**text**|`String`| (Only for type 1 and type 2) a typed string that you want the typing pattern for |
45
+
|**textId**|`Number`| (Optional, only for type 1 and type 2) a personalized id for the typed text |
46
46
|**length**|`Number`| (Optional) the length of the text in the history for which you want the typing pattern, for type 0 is usually 140 or more |
47
-
|**extended**|`Boolean`| (Only for type 1) specifies if full information about what was typed is produced, including the actual key pressed, if false, only the order of pressed keys is kept (no actual content) |
48
47
|**targetId**|`String`| (Optional) specifies if pattern is obtain only from text typed in a certain target |
49
-
|**caseSensitive**|`Boolean`| (Optional, default: false, Only for type 1) Used if you pass a text for type 1 |
48
+
|**caseSensitive**|`Boolean`| (Optional, default: false) Used if you pass a text for type 1 or type 2|
50
49
51
50
**Examples**
52
51
```js
53
-
var diagramPattern =tdna.getTypingPattern({type=1, text="Hello5g21?*", extedend=false});
54
-
var extendedDiagramPattern =tdna.getTypingPattern({type=1, length=160, extended=true});
55
-
var generalPattern =tdna.getTypingPattern({type=0, length=160});
52
+
//anytext pattern
53
+
var typingPattern =tdna.getTypingPattern({type=0, length=160});
54
+
//sametext pattern
55
+
var typingPattern =tdna.getTypingPattern({type=1, text="Hello5g21?*"});
56
+
//extended pattern
57
+
var typingPattern =tdna.getTypingPattern({type=2, text="example@mail.com"});
0 commit comments