npmtest-auto-install (v0.0.1)

Code coverage report for node-npmtest-auto-install/auto-install/node_modules/yargs/lib/obj-filter.js

Statements: 62.5% (5 / 8)      Branches: 50% (3 / 6)      Functions: 33.33% (1 / 3)      Lines: 71.43% (5 / 7)      Ignored: none     

All files » node-npmtest-auto-install/auto-install/node_modules/yargs/lib/ » obj-filter.js
1 2 3 4 5 6 7 8 9 10 11 121 9 9 9         9      
module.exports = function (original, filter) {
  const obj = {}
  filter = filter || function (k, v) { return true }
  Object.keys(original || {}).forEach(function (key) {
    if (filter(key, original[key])) {
      obj[key] = original[key]
    }
  })
  return obj
}