Basic usage

A bit like _.sift but for objects. By default, it will return a new object with all the undefined attributes removed. You can pass a second function argument to remove any attributes by a custom condition.

import { shake } from 'radash'

const ra = {
  mode: 'god',
  greek: false,
  limit: undefined
}

shake(ra) // => { mode, greek }
shake(ra, a => !a) // => { mode }

Testing

This _.shake function is 100% covered by tests. See them and contribute at GitHub.

Source

See the source for _.shake on GitHub.