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"]
The new uniquified array
Generated using TypeDoc
Uniquify
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"]