|
1 | 1 | 'use strict'; |
2 | 2 | const nodeDocUrl = ''; |
3 | 3 | const jsDocPrefix = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/'; |
4 | | -const jsDocUrl = jsDocPrefix + 'Reference/Global_Objects/'; |
5 | | -const jsPrimitiveUrl = jsDocPrefix + 'Data_structures'; |
| 4 | +const jsDocUrl = `${jsDocPrefix}Reference/Global_Objects/`; |
| 5 | +const jsPrimitiveUrl = `${jsDocPrefix}Data_structures`; |
6 | 6 | const jsPrimitives = { |
7 | 7 | 'boolean': 'Boolean', |
8 | 8 | 'integer': 'Number', // not a primitive, used for clarification |
@@ -22,10 +22,10 @@ const jsGlobalTypes = [ |
22 | 22 | 'AsyncFunction', 'SharedArrayBuffer' |
23 | 23 | ]; |
24 | 24 | const typeMap = { |
25 | | - 'Iterable': jsDocPrefix + |
26 | | - 'Reference/Iteration_protocols#The_iterable_protocol', |
27 | | - 'Iterator': jsDocPrefix + |
28 | | - 'Reference/Iteration_protocols#The_iterator_protocol', |
| 25 | + 'Iterable': |
| 26 | + `${jsDocPrefix}Reference/Iteration_protocols#The_iterable_protocol`, |
| 27 | + 'Iterator': |
| 28 | + `${jsDocPrefix}Reference/Iteration_protocols#The_iterator_protocol`, |
29 | 29 |
|
30 | 30 | 'Buffer': 'buffer.html#buffer_class_buffer', |
31 | 31 |
|
@@ -87,11 +87,10 @@ module.exports = { |
87 | 87 | } |
88 | 88 |
|
89 | 89 | if (typeUrl) { |
90 | | - typeLinks.push('<a href="' + typeUrl + '" class="type"><' + |
91 | | - typeTextFull + '></a>'); |
| 90 | + typeLinks.push(` |
| 91 | + <a href="${typeUrl}" class="type"><${typeTextFull}></a>`); |
92 | 92 | } else { |
93 | | - typeLinks.push('<span class="type"><' + typeTextFull + |
94 | | - '></span>'); |
| 93 | + typeLinks.push(`<span class="type"><${typeTextFull}></span>`); |
95 | 94 | } |
96 | 95 | } |
97 | 96 | }); |
|