UNPKG

vue-app-sdk

Version:
17 lines (16 loc) 457 B
import baseGet from "./_baseGet.js"; import baseSet from "./_baseSet.js"; import castPath from "./_castPath.js"; function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = baseGet(object, path); if (predicate(value, path)) { baseSet(result, castPath(path, object), value); } } return result; } export { basePickBy as default };