(obj, target, overwrite)
| 149 | } |
| 150 | |
| 151 | function copyObj(obj, target, overwrite) { |
| 152 | if (!target) { target = {}; } |
| 153 | for (var prop in obj) |
| 154 | { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) |
| 155 | { target[prop] = obj[prop]; } } |
| 156 | return target |
| 157 | } |
| 158 | |
| 159 | // Counts the column offset in a string, taking tabs into account. |
| 160 | // Used mostly to find indentation. |
no outgoing calls
no test coverage detected