GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: replace string concatenation with template · sclarson/node@8c6c060

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools/doc
    • type-parser.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/doc/type-parser.js‎

Copy file name to clipboardExpand all lines: tools/doc/type-parser.js
+9-10Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22
const nodeDocUrl = '';
33
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`;
66
const jsPrimitives = {
77
'boolean': 'Boolean',
88
'integer': 'Number', // not a primitive, used for clarification
@@ -22,10 +22,10 @@ const jsGlobalTypes = [
2222
'AsyncFunction', 'SharedArrayBuffer'
2323
];
2424
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`,
2929

3030
'Buffer': 'buffer.html#buffer_class_buffer',
3131

@@ -87,11 +87,10 @@ module.exports = {
8787
}
8888

8989
if (typeUrl) {
90-
typeLinks.push('<a href="' + typeUrl + '" class="type">&lt;' +
91-
typeTextFull + '&gt;</a>');
90+
typeLinks.push(`
91+
<a href="${typeUrl}" class="type">&lt;${typeTextFull}&gt;</a>`);
9292
} else {
93-
typeLinks.push('<span class="type">&lt;' + typeTextFull +
94-
'&gt;</span>');
93+
typeLinks.push(`<span class="type">&lt;${typeTextFull}&gt;</span>`);
9594
}
9695
}
9796
});

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.