(base, props)
| 4957 | } |
| 4958 | |
| 4959 | function createObj(base, props) { |
| 4960 | function Obj() {} |
| 4961 | Obj.prototype = base; |
| 4962 | var inst = new Obj(); |
| 4963 | if (props) copyObj(props, inst); |
| 4964 | return inst; |
| 4965 | } |
| 4966 | |
| 4967 | function copyObj(obj, target) { |
| 4968 | if (!target) target = {}; |