(...args)
| 90 | enabled = testEnabled(set); |
| 91 | } |
| 92 | let debug = (...args) => { |
| 93 | init(); |
| 94 | // Only invokes debuglogImpl() when the debug function is |
| 95 | // called for the first time. |
| 96 | debug = debuglogImpl(enabled, set); |
| 97 | if (typeof cb === 'function') { |
| 98 | ObjectDefineProperty(debug, 'enabled', { |
| 99 | __proto__: null, |
| 100 | get() { |
| 101 | return enabled; |
| 102 | }, |
| 103 | configurable: true, |
| 104 | enumerable: true, |
| 105 | }); |
| 106 | cb(debug); |
| 107 | } |
| 108 | switch (args.length) { |
| 109 | case 1: return debug(args[0]); |
| 110 | case 2: return debug(args[0], args[1]); |
| 111 | default: return debug(...new SafeArrayIterator(args)); |
| 112 | } |
| 113 | }; |
| 114 | let enabled; |
| 115 | let test = () => { |
| 116 | init(); |
no test coverage detected
searching dependent graphs…