Tags and tests

This commit is contained in:
Angelos Chalaris
2018-07-18 21:02:42 +03:00
parent 03ee6f73ca
commit b129b46c0d
8 changed files with 115 additions and 1 deletions

View File

@ -0,0 +1,3 @@
const filterNonUniqueBy = (arr, fn) =>
arr.filter((v, i) => arr.every((x, j) => i == j == fn(v, x, i, j)));
module.exports = filterNonUniqueBy;