(obj)
| 40 | template = arguments[1], |
| 41 | templateArgs = arguments, |
| 42 | stringify = function (obj) { |
| 43 | if (typeof obj === 'function') { |
| 44 | return obj.toString().replace(/ \{[\s\S]*$/, ''); |
| 45 | } else if (typeof obj === 'undefined') { |
| 46 | return 'undefined'; |
| 47 | } else if (typeof obj !== 'string') { |
| 48 | return JSON.stringify(obj); |
| 49 | } |
| 50 | return obj; |
| 51 | }, |
| 52 | message, i; |
| 53 | |
| 54 | message = prefix + template.replace(/\{\d+\}/g, function (match) { |