-
Notifications
You must be signed in to change notification settings - Fork 0
/
InteractionManager.js
54 lines (49 loc) · 1.48 KB
/
InteractionManager.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class InteractionManager{
is_input_empty(input){
/**
* @description This method checks whether or not the parameter is empty
* @param {any} input
* @method is_input_empty
* @returns {boolean} whether or not the parameter is empty
**/
return input == "";
}
is_input_too_long(input, length){
/**
* @description This method checks whether or not the input is too long
* @param {string} input
* @param {number} length
* @returns {string} whether or not the input is too long
**/
if(toString(input).length() > parseInt(length)){
return Boolean.toString(true);
}else{
return Boolean.toString(false);
}
}
is_string(input){
/**
* @param input
* @method is_string
* @returns {boolean} whether or not the parameter is a string
**/
return typeof input == "string";
}
is_number(input){
/**
* @description This method checks if the parameter is a number
* @param input
* @method is_number
* @returns whether or not the parameter is a number
*/
return input == typeof "number";
}
is_input_boolean(input){
/**
* @param input
* @method is_input_boolean
* @returns whether or not the parameter is a boolean
**/
return typeof input == "boolean";
}
};