| 1 | ## Benchmarks |
| 2 | |
| 3 | This library is **10-20 times faster** and more performant than [array-union][]. |
| 4 | |
| 5 | See the [benchmarks](./benchmark). |
| 6 | |
| 7 | ```sh |
| 8 | {%= doc('benchmark/last.md') %} |
| 9 | ``` |
| 10 | |
| 11 | ## Usage |
| 12 | |
| 13 | ```js |
| 14 | var union = require('{%= name %}'); |
| 15 | |
| 16 | union(['a'], ['b', 'c'], ['d', 'e', 'f']); |
| 17 | //=> ['a', 'b', 'c', 'd', 'e', 'f'] |
| 18 | ``` |
| 19 | |
| 20 | Returns only unique elements: |
| 21 | |
| 22 | ```js |
| 23 | union(['a', 'a'], ['b', 'c']); |
| 24 | //=> ['a', 'b', 'c'] |
| 25 | ``` |
| 26 | |
| 27 | [array-union]: https://github.com/sindresorhus/array-union |