UNPKG

atikin-universal-validator

Version:

A blazing-fast, zero-dependency validator for frontend and backend JS/TS applications.

10 lines (9 loc) 280 B
export function isEmpty(value: any): boolean { return ( value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0) || (typeof value === 'object' && Object.keys(value).length === 0) ); }