@mindfulness/utils
    Preparing search index...

    Function omitEmpty

    • Returns an object with all the key/value pairs that are null or undefined are removed.

      Type Parameters

      • T
      • K extends string | number | symbol

      Parameters

      • obj: T

        The object to strip null and undefined from.

      Returns Partial<T>

      The stripped object.

      omitEmpty({ a: "", b: "asdas", c: false, d: null, e: undefined, f: 0 });
      // { a: "", b: "asdas", c: false, f: 0 }