@vsokolov/utils - v1.4.2
    Preparing search index...

    Function removeEmpty

    • Recursively remove empty values (null, undefined, '', [], {}) from object or array

      Type Parameters

      • T

      Parameters

      • value: T

        Value to clean

      Returns T | null

      Cleaned value or null if result is empty

      removeEmpty({ a: 1, b: null, c: { d: [], e: 'hello' } })
      // => { a: 1, c: { e: 'hello' } }