(obj, path, value)
| 723 | } |
| 724 | |
| 725 | function putNested (obj, path, value) { |
| 726 | var last = obj, key; |
| 727 | |
| 728 | while (path.length > 1) { |
| 729 | key = path.shift(); |
| 730 | if (!last[key]) { |
| 731 | last[key] = {}; |
| 732 | } |
| 733 | |
| 734 | last = last[key]; |
| 735 | } |
| 736 | |
| 737 | last[path.shift()] = value; |
| 738 | } |
| 739 | |
| 740 | Object.keys(results).forEach(function (key) { |
| 741 | putNested(obj, key.split('.'), results[key]); |
no outgoing calls
no test coverage detected
searching dependent graphs…