Created
June 14, 2020 06:16
-
-
Save funnythingz/245e44f7ddd13f31076ed003fa80f298 to your computer and use it in GitHub Desktop.
多次元配列の重複削除も可
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const compact = v => v.filter((vv, index, array) => (index === array.findIndex((vvAnother) => (JSON.stringify(vv) === JSON.stringify(vvAnother))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
フツーの配列の場合はこれでいける