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

    Function remove

    • Returns the array that removes the given element

      Type Parameters

      • E

      Parameters

      • Optionalarray: null | E[]

        the arrays to inspect

      • Optionalelement: null | E

        the element to remove

      Returns undefined | null | E[]

      the array that removes the given element

      David Hsing

      remove(undefined, 'bar');    // undefined
      remove(['foo', 'bar'], undefined); // ['foo', 'bar']
      remove(['foo', 'bar'], 'bar'); // ['foo']