Sha256: 9184dc83a84c652da1c592b3245509521171c9d4c52c6c5edbc5544dc0527a42

Contents?: true

Size: 269 Bytes

Versions: 43

Compression:

Stored size: 269 Bytes

Contents

'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
}

Version data entries

43 entries across 29 versions & 11 rubygems

Version Path
tang-0.0.9 spec/tang_app/node_modules/yargs/lib/obj-filter.js
enju_library-0.3.8 spec/dummy/node_modules/yargs/lib/obj-filter.js
enju_library-0.3.8 spec/dummy/node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
learn_create-0.0.22 lib/templates/javascript_lab_template/node_modules/yargs/lib/obj-filter.js
jester-data-8.0.0 node_modules/yargs/lib/obj-filter.js
jester-data-8.0.0 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-5.2.1 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-5.2.1 node_modules/yargs/lib/obj-filter.js
ezii-os-2.0.1 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-2.0.1 node_modules/yargs/lib/obj-filter.js
ezii-os-1.1.0 node_modules/yargs/lib/obj-filter.js
ezii-os-1.1.0 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-1.0.0 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-1.0.0 node_modules/yargs/lib/obj-filter.js
ezii-os-0.0.0.1.0 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-0.0.0.1.0 node_modules/yargs/lib/obj-filter.js
ezii-os-0.0.0.0.1 node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
ezii-os-0.0.0.0.1 node_modules/yargs/lib/obj-filter.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/yargs/lib/obj-filter.js
locomotivecms-3.4.0 app/javascript/node_modules/yargs/lib/obj-filter.js