5b7d1e5f06432bfca21247e5206a2e1a3bdda524.svn-base 269 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 'use strict' module.exports = function objFilter (original, filter) { const obj = {} filter = filter || ((k, v) => true) Object.keys(original || {}).forEach((key) => { if (filter(key, original[key])) { obj[key] = original[key] } }) return obj }