sb-mig
Version:
CLI to rule the world. (and handle stuff related to Storyblok CMS)
21 lines (20 loc) • 548 B
TypeScript
/**
* Array utility functions
*/
/**
* Get unique values from an array
* Uses Set for O(n) deduplication
*
* @param array - The array to deduplicate
* @returns A new array with only unique values
*
* @example
* uniqueValuesFrom([1, 2, 2, 3, 3, 3]) // => [1, 2, 3]
* uniqueValuesFrom(['a', 'b', 'a']) // => ['a', 'b']
*/
export declare const uniqueValuesFrom: <T>(array: T[]) => T[];
/**
* @deprecated Use uniqueValuesFrom instead
* Alias for backwards compatibility
*/
export declare const _uniqueValuesFrom: <T>(array: T[]) => T[];