Pretty sure the nodejs array basics has taught us this simple job...
arr = [...new Set(arr.flat())]
This is just a basic working of arrays on nodejs, so why should we use this?
The index.js file is literally so small, and also may I know are all these 6M people who use this never knew this simple thing?