tools,doc: update JavaScript primitive types to match MDN Web Docs

- Update primitive types to lower case, so the anchor of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Data_structures will work correctly.
- Add `bigint` to primitive types to match MDN Web Doc.

PR-URL: https://github.com/nodejs/node/pull/60581
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
JustApple authored and Antoine du Hamel committed 2025-11-10 13:30:10 +01:00
1 parent e3c5dcf1ea
commit 815edb0c3a
1 file changed
+8 -8
+8 -8
View File
@@ -3,13 +3,14 @@ const jsDocPrefix = `${mdnPrefix}/JavaScript/`;
const jsDataStructuresUrl = `${jsDocPrefix}Data_structures`;
const jsPrimitives = {
boolean: 'Boolean',
integer: 'Number', // Not a primitive, used for clarification.
null: 'Null',
number: 'Number',
string: 'String',
symbol: 'Symbol',
undefined: 'Undefined',
boolean: 'boolean',
integer: 'number', // Not a primitive, used for clarification.
null: 'null',
number: 'number',
string: 'string',
symbol: 'symbol',
undefined: 'undefined',
bigint: 'bigint',
};
const jsGlobalObjectsUrl = `${jsDocPrefix}Reference/Global_Objects/`;
@@ -43,7 +44,6 @@ const customTypesMap = {
'AsyncGeneratorFunction': 'https://tc39.es/proposal-async-iteration/#sec-asyncgeneratorfunction-constructor',
'bigint': `${jsDocPrefix}Reference/Global_Objects/BigInt`,
'WebAssembly.Instance':
`${jsDocPrefix}Reference/Global_Objects/WebAssembly/Instance`,
'WebAssembly.Memory':