Checks if the given object is present and it is not empty (contains at least one entry).

Type signature

<T>(xs?: GenericObject<T>) => boolean

Examples

any({ a: 1, b: 2, c: 3 });
// ⇒ true
Try in REPL
any({});
// ⇒ false
Try in REPL
any(null);
// ⇒ false
Try in REPL
any(undefined);
// ⇒ false
Try in REPL

Questions

  • How to check if an object is not empty?
  • How to check if an object contains some values?
  • How to check if an object is not null or undefined?

TypeScript sourceJavaScript source