just-union

returns the union of two arrays

Usage no npm install needed!

<script type="module">
  import justUnion from 'https://cdn.skypack.dev/just-union';
</script>

README

just-union

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-union
yarn add just-union

Returns the union of two arrays

import union from 'just-union';

union([1, 2, 5, 6], [2, 3, 4, 6]); // [1, 2, 3, 4, 5, 6]