mirror of
https://github.com/garraflavatra/rolens.git
synced 2024-12-01 14:20:54 +01: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') {
|
||||
// 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);
|
||||
return `object (${keys.length} item${keys.length === 1 ? '' : 's'})`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user