investira.sdk 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/utils/dates.js +2 -2
- package/lib/utils/validators.js +8 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/lib/utils/dates.js
CHANGED
|
@@ -1002,7 +1002,7 @@ const dates = {
|
|
|
1002
1002
|
xNextDate = dates.nextMonthAnniversary(xNextDate);
|
|
1003
1003
|
}
|
|
1004
1004
|
//Se dia da semana estive configurado, ajusta data para o dia da semana informado
|
|
1005
|
-
if (pSchedule
|
|
1005
|
+
if (pSchedule.weekday && (pSchedule.weekday >= 0 || pSchedule.weekDay >= 0)) {
|
|
1006
1006
|
xNextDate = dates.scheduleToDate({ ...pSchedule, type: 'W' }, xNextDate);
|
|
1007
1007
|
}
|
|
1008
1008
|
} else if (pSchedule.type === 'Y') {
|
|
@@ -1024,7 +1024,7 @@ const dates = {
|
|
|
1024
1024
|
xNextDate = dates.addYears(xNextDate, 1);
|
|
1025
1025
|
}
|
|
1026
1026
|
//Se dia da semana estive configurado, ajusta data para o dia da semana informado
|
|
1027
|
-
if (pSchedule
|
|
1027
|
+
if (pSchedule.weekday && (pSchedule.weekday >= 0 || pSchedule.weekDay >= 0)) {
|
|
1028
1028
|
xNextDate = dates.scheduleToDate({ ...pSchedule, type: 'W' }, xNextDate);
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
package/lib/utils/validators.js
CHANGED
|
@@ -20,7 +20,11 @@ const validators = {
|
|
|
20
20
|
* @return {boolean} Se é nulo
|
|
21
21
|
*/
|
|
22
22
|
isNull: toValidate => {
|
|
23
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
toValidate === null ||
|
|
25
|
+
validators.isUndefined(toValidate) ||
|
|
26
|
+
String(toValidate).toLocaleLowerCase() === 'null'
|
|
27
|
+
);
|
|
24
28
|
},
|
|
25
29
|
|
|
26
30
|
/**
|
|
@@ -104,7 +108,9 @@ const validators = {
|
|
|
104
108
|
if (toValidate === undefined) {
|
|
105
109
|
return true;
|
|
106
110
|
}
|
|
107
|
-
return
|
|
111
|
+
return (
|
|
112
|
+
validators.trueTypeOf(toValidate) === 'undefined' || String(toValidate).toLocaleLowerCase() === 'undefined'
|
|
113
|
+
);
|
|
108
114
|
},
|
|
109
115
|
|
|
110
116
|
/**
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "investira.sdk",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"author": "Investira",
|
|
5
5
|
"description": "Investira SDK",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"registry": true,
|
|
9
|
-
"raw": "investira.sdk@2.4.
|
|
9
|
+
"raw": "investira.sdk@2.4.4",
|
|
10
10
|
"escapedName": "investira.sdk",
|
|
11
|
-
"rawSpec": "2.4.
|
|
11
|
+
"rawSpec": "2.4.4",
|
|
12
12
|
"saveSpec": null,
|
|
13
|
-
"fetchSpec": "2.4.
|
|
13
|
+
"fetchSpec": "2.4.4",
|
|
14
14
|
"homepage": "https://investira.com.br/",
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=11.11.0 <=18.12",
|