* Merge 2 given Objects. If a conflict occurs the second object wins. * Does not do deep merges. * * @param {Object} first base object * @param {Object} second overrides * @returns {Object} merged first and second * @private
(first, second)
| 41 | * @private |
| 42 | */ |
| 43 | function _merge(first, second) { |
| 44 | var target = {}; |
| 45 | |
| 46 | [first, second].forEach(function(obj) { |
| 47 | for (var prop in obj) { |
| 48 | if (Object.prototype.hasOwnProperty.call(obj, prop)) { |
| 49 | target[prop] = obj[prop]; |
| 50 | } |
| 51 | } |
| 52 | return target; |
| 53 | }); |
| 54 | |
| 55 | return target; |
| 56 | } |
| 57 | |
| 58 | function _isShapedLikeParsableError(err) { |
| 59 | return err.stack || err['opera#sourceloc']; |