Removes (shakes out) undefined entries from an object. Optional second argument shakes out values by custom evaluation.
const ra = { mode: 'god', greek: false, limit: undefined}shake(ra) // => { mode, greek }shake(ra, a => !a) // => { mode } Copy
const ra = { mode: 'god', greek: false, limit: undefined}shake(ra) // => { mode, greek }shake(ra, a => !a) // => { mode }
Description
Removes (shakes out) undefined entries from an object. Optional second argument shakes out values by custom evaluation.
Example