mirror of
https://github.com/garraflavatra/rolens.git
synced 2024-12-01 13:20:54 +00:00
Regognize null as a distinct type
This commit is contained in:
parent
9f095697f5
commit
46bf6b70b3
@ -45,7 +45,10 @@
|
|||||||
// else if (new Date(value).toString() !== 'Invalid Date') {
|
// else if (new Date(value).toString() !== 'Invalid Date') {
|
||||||
// return 'date';
|
// return 'date';
|
||||||
// }
|
// }
|
||||||
else if ((typeof value === 'object') && (value !== null)) {
|
else if (value === null) {
|
||||||
|
return 'null';
|
||||||
|
}
|
||||||
|
else if (typeof value === 'object') {
|
||||||
const keys = Object.keys(value);
|
const keys = Object.keys(value);
|
||||||
return `object (${keys.length} item${keys.length === 1 ? '' : 's'})`;
|
return `object (${keys.length} item${keys.length === 1 ? '' : 's'})`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user