-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
75 lines (73 loc) · 1.84 KB
/
app.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* Determines whether oParam is a number
* @param {any} sParam: The Parameter to check
* @returns {boolean} - Result
*/
const isNumber = (sParam) => {
return typeof sParam === "number";
};
/**
* Determines whether oParam is string
* @param {any} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isString = (oParam) => {
return typeof oParam === "string";
};
/**
* Determines whether oParam is a Regular Expression
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isRegExp = (oParam) => {
return oParam instanceof RegExp;
};
/**
* Determines whether oParam is a boolean
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isBoolean = (oParam) => {
return typeof oParam === "boolean";
};
/**
* Determines whether oParam is undefined
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isUndefined = (oParam) => {
return typeof oParam === "undefined";
};
/**
* Determines whether oParam is a function
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isFunction = (oParam) => {
return typeof oParam === "function";
};
/**
* Determines whether oParam is an object
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isObject = (oParam) => {
return typeof oParam === "object";
};
/**
* Determines whether oParam is an array
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isArray = (oParam) => {
return Array.isArray(oParam);
};
/**
* Determines whether oParam is null
* @param {*} oParam: The Parameter to check
* @returns {boolean} - Result
*/
const isNull = (oParam) => {
return oParam === null;
};
module.exports = { isNumber, isString, isRegExp, isBoolean, isUndefined , isFunction, isObject, isArray, isNull }