(func)
| 4591 | } |
| 4592 | |
| 4593 | function isClass(func) { |
| 4594 | // IE 9-11 do not support classes and IE9 leaks with the code below. |
| 4595 | if (msie <= 11) { |
| 4596 | return false; |
| 4597 | } |
| 4598 | // Workaround for MS Edge. |
| 4599 | // Check https://connect.microsoft.com/IE/Feedback/Details/2211653 |
| 4600 | return typeof func === 'function' && |
| 4601 | /^(?:class\s|constructor\()/.test(Function.prototype.toString.call(func)); |
| 4602 | } |
| 4603 | |
| 4604 | function invoke(fn, self, locals, serviceName) { |
| 4605 | if (typeof locals === 'string') { |