(base, props)
| 7027 | if ([].map) map = function(array, f) { return array.map(f); }; |
| 7028 | |
| 7029 | function createObj(base, props) { |
| 7030 | var inst; |
| 7031 | if (Object.create) { |
| 7032 | inst = Object.create(base); |
| 7033 | } else { |
| 7034 | var ctor = function() {}; |
| 7035 | ctor.prototype = base; |
| 7036 | inst = new ctor(); |
| 7037 | } |
| 7038 | if (props) copyObj(props, inst); |
| 7039 | return inst; |
| 7040 | }; |
| 7041 | |
| 7042 | function copyObj(obj, target, overwrite) { |
| 7043 | if (!target) target = {}; |
no test coverage detected
searching dependent graphs…