UNPKG

ion

Version:

ion language ========================

12 lines (10 loc) 359 B
// Fix Function#name on browsers that do not support it (IE): if (!(function f() {}).name) { Object.defineProperty(Function.prototype, 'name', { get: function() { var name = this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1] Object.defineProperty(this, 'name', {value:name}) return name } }); }