source: trip-planner-front/node_modules/array-union/index.d.ts@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 609 bytes
Line 
1/**
2Create an array of unique values, in order, from the input arrays.
3
4@example
5```
6import arrayUnion = require('array-union');
7
8arrayUnion([1, 1, 2, 3], [2, 3]);
9//=> [1, 2, 3]
10
11arrayUnion(['foo', 'foo', 'bar']);
12//=> ['foo', 'bar']
13
14arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
15//=> ['🐱', '🦄', '🐻', '🌈']
16
17arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
18//=> ['🐱', '🦄', '🐻', '🐶', '🌈']
19```
20*/
21declare function arrayUnion<ArgumentsType extends readonly unknown[]>(
22 ...arguments: readonly ArgumentsType[]
23): ArgumentsType;
24
25export = arrayUnion;
Note: See TracBrowser for help on using the repository browser.