(obj, target, overwrite)
| 657 | } |
| 658 | |
| 659 | function copyObj(obj, target, overwrite) { |
| 660 | if (!target) { |
| 661 | target = {} |
| 662 | } |
| 663 | for (var prop in obj) { |
| 664 | if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) { |
| 665 | target[prop] = obj[prop] |
| 666 | } |
| 667 | } |
| 668 | return target |
| 669 | } |
| 670 | |
| 671 | // Counts the column offset in a string, taking tabs into account. |
| 672 | // Used mostly to find indentation. |
no outgoing calls
no test coverage detected