mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-23 18:34:45 +01:00
25 lines
609 B
TypeScript
25 lines
609 B
TypeScript
/**
|
|
Create an array of unique values, in order, from the input arrays.
|
|
|
|
@example
|
|
```
|
|
import arrayUnion = require('array-union');
|
|
|
|
arrayUnion([1, 1, 2, 3], [2, 3]);
|
|
//=> [1, 2, 3]
|
|
|
|
arrayUnion(['foo', 'foo', 'bar']);
|
|
//=> ['foo', 'bar']
|
|
|
|
arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
|
|
//=> ['🐱', '🦄', '🐻', '🌈']
|
|
|
|
arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
|
|
//=> ['🐱', '🦄', '🐻', '🐶', '🌈']
|
|
```
|
|
*/
|
|
declare function arrayUnion<ArgumentsType extends readonly unknown[]>(
|
|
...arguments: readonly ArgumentsType[]
|
|
): ArgumentsType;
|
|
|
|
export = arrayUnion;
|