| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b690e19 commit f897860
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -847,10 +847,11 @@ function getBoxedBase(value, ctx, keys, constructor, tag) { | |||
| 847 | 847 | ||
| 848 | 848 | function getFunctionBase(value, constructor, tag) { | |
| 849 | 849 | let type = 'Function'; | |
| 850 | + if (isGeneratorFunction(value)) { | ||
| 851 | + type = `Generator${type}`; | ||
| 852 | + } | ||
| 850 | 853 | if (isAsyncFunction(value)) { | |
| 851 | - type = 'AsyncFunction'; | ||
| 852 | - } else if (isGeneratorFunction(value)) { | ||
| 853 | - type = 'GeneratorFunction'; | ||
| 854 | + type = `Async${type}`; | ||
| 854 | 855 | } | |
| 855 | 856 | let base = `[${type}`; | |
| 856 | 857 | if (constructor === null) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,6 +48,10 @@ assert.strictEqual(util.inspect(async () => {}), '[AsyncFunction]'); | |||
| 48 | 48 | util.inspect(fn), | |
| 49 | 49 | '[GeneratorFunction]' | |
| 50 | 50 | ); | |
| 51 | + assert.strictEqual( | ||
| 52 | + util.inspect(async function* abc() {}), | ||
| 53 | + '[AsyncGeneratorFunction: abc]' | ||
| 54 | + ); | ||
| 51 | 55 | Object.setPrototypeOf(fn, Object.getPrototypeOf(async () => {})); | |
| 52 | 56 | assert.strictEqual( | |
| 53 | 57 | util.inspect(fn), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments