Skip to content

isEmpty() function

주어진 값이 빈 값이면 true를 반환하고, 그렇지 않으면 false를 반환합니다.

Signature:

typescript
isEmpty: <T>(value: T) => boolean;

Example

ts
isEmpty({}); // true
isEmpty([]); // true
isEmpty(null); // true
isEmpty(undefined); // true
isEmpty(""); // true
isEmpty(new Map()); // true
isEmpty(new Set()); // true

isEmpty(0); // false
isEmpty(false); // false
isEmpty(function () {}); // false
isEmpty(Symbol("")); // false
isEmpty(new Date()); // false

Open Source Code

Released under the Apache-2.0 License.