Skip to content

shake

Removes (shakes out) undefined entries from an object. Optional second argument shakes out values by custom evaluation.

Usage

const a = { a: 1, b: undefined, c: 3 };
shake(a); // => { a: 1, c: 3 }

Installation

Terminal window
npx atmx add helper shake