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

    Function remove

    • Returns the array that removes the given element

      Type Parameters

      • E

      Parameters

      • Optionalarray: E[] | null

        The arrays to inspect

      • Optionalelement: E | null

        The element to remove

      Returns E[] | null | undefined

      the array that removes the given element

      David Hsing

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