• File: obj-filter.js
  • Full Path: /home6/laduliya/test.mydthpay.com/node_modules/npm/node_modules/yargs/lib/obj-filter.js
  • Date Modified: 10/26/1985 11:45 AM
  • File size: 269 bytes
  • MIME-type: text/plain
  • Charset: utf-8
'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
}