(delta, path)
| 230 | } |
| 231 | |
| 232 | const prunePath = function (delta, path) { |
| 233 | if (path.length === 1) { |
| 234 | if (delta[path] !== undefined) { return delete delta[path] } |
| 235 | } else { |
| 236 | if (delta[path[0]] !== undefined) { prunePath(delta[path[0]], path.slice(1)) } |
| 237 | const keys = (Array.from(_.keys(delta[path[0]])).filter((k) => k !== '_t')) |
| 238 | if (keys.length === 0) { return delete delta[path[0]] } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | module.exports.DOC_SKIP_PATHS = [ |
| 243 | '_id', 'version', 'commitMessage', 'parent', 'created', |