UNPKG

@codeparticle/formal

Version:

A <2kb library for validating data of any kind

19 lines (17 loc) 489 B
import { createRule } from "./chunk-DDICIM7S.mjs"; // src/rules/is-non-empty-object.ts var isNonEmptyObject = createRule({ condition: (obj) => !!obj && typeof obj === `object` && Reflect.ownKeys(obj).length > 0, message: (obj) => typeof obj === `object` ? `Object must not be empty` : `Value ${obj} is not an object` }); export { isNonEmptyObject }; /** * @file check that an object has keys * @author Nick Krause * @license MIT */ //# sourceMappingURL=chunk-ZS3MKFQM.mjs.map