tuijs-util 1.3.2 → 1.3.3
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/package.json
CHANGED
|
@@ -119,7 +119,7 @@ export function checkIsList(input) {
|
|
|
119
119
|
*/
|
|
120
120
|
export function checkIsArray(input) {
|
|
121
121
|
try {
|
|
122
|
-
return input
|
|
122
|
+
return Array.isArray(input);
|
|
123
123
|
} catch (er) {
|
|
124
124
|
throw new Error(er.message);
|
|
125
125
|
}
|
|
@@ -133,7 +133,7 @@ export function checkIsArray(input) {
|
|
|
133
133
|
*/
|
|
134
134
|
export function checkIsObject(input) {
|
|
135
135
|
try {
|
|
136
|
-
return input.constructor === Object;
|
|
136
|
+
return input !== null && typeof input === 'object' && input.constructor === Object;
|
|
137
137
|
} catch (er) {
|
|
138
138
|
throw new Error(er.message);
|
|
139
139
|
}
|