UNPKG

imma

Version:

A collection of functions for dealing with native arrays and objects immutably

9 lines (8 loc) 205 B
'use strict' const filter = module.exports = (object, fn) => { const result = {} for (let key in object) { if (fn(object[key], key, object)) result[key] = object[key] } return result }