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
optimacms-0.1.61 spec/dummy/node_modules/webpack-dev-server/node_modules/yargs/lib/obj-filter.js
optimacms-0.1.61 spec/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.18.0 test/dummy/node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
disco_app-0.18.0 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.18.2 test/dummy/node_modules/webpack-cli/node_modules/yargs/lib/obj-filter.js
disco_app-0.18.2 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.16.1 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.15.2 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.18.4 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.18.1 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.14.0 test/dummy/node_modules/yargs/lib/obj-filter.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/yargs/lib/obj-filter.js
tang-0.2.1 spec/tang_app/node_modules/yargs/lib/obj-filter.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/yargs/lib/obj-filter.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/yargs/lib/obj-filter.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/yargs/lib/obj-filter.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/yargs/lib/obj-filter.js
tang-0.2.0 spec/tang_app/node_modules/yargs/lib/obj-filter.js
tang-0.1.0 spec/tang_app/node_modules/yargs/lib/obj-filter.js