UNPKG

tricks

Version:
15 lines (14 loc) 247 B
// Return all the properties in 'a' which aren't in 'b'; export default (a, b) => { if (a || !b) { const r = {}; for (const x in a) { // is this a custom property? if (!(x in b)) { r[x] = a[x]; } } return r; } return a; };