Update javascript-blank-value.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-08-31 16:29:37 +03:00
committed by GitHub
parent 3ef5bacc59
commit 09ad42bb49

View File

@ -67,7 +67,7 @@ const isWhitespaceString = value =>
typeof value === 'string' && /^\s*$/.test(value);
const isEmptyCollection = value =>
(Array.isArray(value) || value === Object(value)) &&
!!Object.keys(value).length;
!Object.keys(value).length;
const isInvalidDate = value =>
value instanceof Date && Number.isNaN(value.getTime());
const isEmptySet = value => value instanceof Set && value.size === 0;