Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am pthm on github.
  • I am pthm (https://keybase.io/pthm) on keybase.
  • I have a public key whose fingerprint is 4B79 518C EFF9 A10B 6047 0555 D0F5 7F94 6050 E142

To claim this, I am signing this object:

@pthm
pthm / example.js
Created June 24, 2019 18:19
multi dimensional commonality js
let a = [["a","b","c"],["b","c","d"],["a","b","c"]];
let b = [...new Set(a.reduce((acc,v,i)=>acc.concat(v.filter(v => a.every(a => a.includes(v)))),[]))]
console.log(b)