UNPKG

atikin-universal-validator

Version:

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

11 lines (10 loc) 346 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isEmpty = isEmpty; function isEmpty(value) { return (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0) || (typeof value === 'object' && Object.keys(value).length === 0)); }