@yookue/ts-lang-utils
    Preparing search index...

    Function firstNotNil

    • Returns the first not nil element in the given objects, or undefined if all elements are nil

      Parameters

      • ...objects: any[] | readonly any[]

        the objects to check

      Returns any

      the first not nil element in the given objects, or undefined if all elements are nil

      David Hsing

      firstNotNil(null, undefined, 'foo', 'bar', {});    // 'foo'