...
|
...
|
@@ -21,6 +21,11 @@ const assetType = (value, type) => { |
|
|
if (!valid && t === 'object') {
|
|
|
valid = value instanceof type;
|
|
|
}
|
|
|
if (!valid && expectedType.toLowerCase() === 'number') {
|
|
|
const parseNumber = parseInt(value, 10);
|
|
|
|
|
|
valid = parseNumber || parseNumber === 0;
|
|
|
}
|
|
|
} else if (expectedType === 'Object') {
|
|
|
valid = value.toString() === '[object Object]';
|
|
|
} else if (expectedType === 'Array') {
|
...
|
...
|
|