Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "array/uniquify"

Index

Functions

Functions

uniquify

  • uniquify<T>(array: T[]): T[]
  • Removes repeated items from the array


    Example:

    import { uniquify } "@thalesrc/js-utils/array";
    
    const array = ["a", "b", "c", "a", "b", "c"];
    
    uniquify(array); // ["a", "b", "c"]

    Prototype Example:

    import "@thalesrc/js-utils/array/proto/uniquify";
    
    const array = ["a", "b", "c", "a", "b", "c"];
    
    array.uniquify(); // ["a", "b", "c"]

    Type parameters

    • T

    Parameters

    • array: T[]

    Returns T[]

    The new uniquified array

Generated using TypeDoc