11'use strict' ;
22
3+ // These are string replacements specific to Node.js API docs for anchor IDs
4+ export const DOC_API_SLUGS_REPLACEMENTS = [
5+ { from : / n o d e .j s / i, to : 'nodejs' } , // Replace Node.js
6+ { from : / & / , to : '-and-' } , // Replace &
7+ { from : / [ / _ , : ; \\ ] / g, to : '-' } , // Replace /_,:;\. and whitespace
8+ { from : / - - + / g, to : '-' } , // Replace multiple hyphens with single
9+ { from : / ^ - / , to : '' } , // Remove any leading hyphen
10+ { from : / - $ / , to : '' } , // Remove any trailing hyphen
11+ ] ;
12+
313// This is the base URL of the MDN Web documentation
414export const DOC_MDN_BASE_URL = 'https://developer.mozilla.org/en-US/docs/Web/' ;
515
@@ -104,6 +114,7 @@ export const DOC_TYPES_MAPPING_GLOBALS = {
104114 'WeakSet' ,
105115
106116 'TypedArray' ,
117+ 'Float16Array' ,
107118 'Float32Array' ,
108119 'Float64Array' ,
109120 'Int8Array' ,
@@ -137,6 +148,7 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
137148 AesGcmParams : 'webcrypto.html#class-aesgcmparams' ,
138149 AesKeyAlgorithm : 'webcrypto.html#class-aeskeyalgorithm' ,
139150 AesKeyGenParams : 'webcrypto.html#class-aeskeygenparams' ,
151+ AesDerivedKeyParams : 'webcrypto.html#class-aesderivedkeyparams' ,
140152
141153 Blob : 'buffer.html#class-blob' ,
142154 BroadcastChannel :
@@ -148,6 +160,8 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
148160 Channel : 'diagnostics_channel.html#class-channel' ,
149161 ChildProcess : 'child_process.html#class-childprocess' ,
150162 Cipher : 'crypto.html#class-cipher' ,
163+ Cipheriv : 'crypto.html#class-cipheriv' ,
164+ Decipheriv : 'crypto.html#class-decipheriv' ,
151165 ClientHttp2Session : 'http2.html#class-clienthttp2session' ,
152166 ClientHttp2Stream : 'http2.html#class-clienthttp2stream' ,
153167
@@ -201,6 +215,8 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
201215 IntervalHistogram :
202216 'perf_hooks.html#class-intervalhistogram-extends-histogram' ,
203217
218+ LockManager : 'worker_threads.html#class-lockmanager' ,
219+
204220 KeyAlgorithm : 'webcrypto.html#class-keyalgorithm' ,
205221 KeyObject : 'crypto.html#class-keyobject' ,
206222
@@ -229,6 +245,10 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
229245 ReadableStreamDefaultReader :
230246 'webstreams.html#class-readablestreamdefaultreader' ,
231247
248+ ModuleRequest : 'vm.html#type-modulerequest' ,
249+
250+ DatabaseSync : 'sqlite.html#class-databasesync' ,
251+
232252 RecordableHistogram :
233253 'perf_hooks.html#class-recordablehistogram-extends-histogram' ,
234254
@@ -243,6 +263,10 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
243263
244264 Sign : 'crypto.html#class-sign' ,
245265
266+ Disposable :
267+ 'https://tc39.es/proposal-explicit-resource-management/#sec-disposable-interface' ,
268+
269+ Session : 'sqlite.html#class-session' ,
246270 StatementSync : 'sqlite.html#class-statementsync' ,
247271
248272 Stream : 'stream.html#stream' ,
@@ -283,71 +307,20 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
283307
284308 'brotli options' : 'zlib.html#class-brotlioptions' ,
285309
286- 'cluster.Worker' : 'cluster.html#class-worker' ,
287-
288- 'crypto.constants' : 'crypto.html#cryptoconstants' ,
289-
290- 'dgram.Socket' : 'dgram.html#class-dgramsocket' ,
291-
292- 'errors.Error' : 'errors.html#class-error' ,
293-
294- 'fs.Dir' : 'fs.html#class-fsdir' ,
295- 'fs.Dirent' : 'fs.html#class-fsdirent' ,
296- 'fs.FSWatcher' : 'fs.html#class-fsfswatcher' ,
297- 'fs.ReadStream' : 'fs.html#class-fsreadstream' ,
298- 'fs.StatFs' : 'fs.html#class-fsstatfs' ,
299- 'fs.Stats' : 'fs.html#class-fsstats' ,
300- 'fs.StatWatcher' : 'fs.html#class-fsstatwatcher' ,
301- 'fs.WriteStream' : 'fs.html#class-fswritestream' ,
302-
303- 'http.Agent' : 'http.html#class-httpagent' ,
304- 'http.ClientRequest' : 'http.html#class-httpclientrequest' ,
305- 'http.IncomingMessage' : 'http.html#class-httpincomingmessage' ,
306- 'http.OutgoingMessage' : 'http.html#class-httpoutgoingmessage' ,
307- 'http.Server' : 'http.html#class-httpserver' ,
308- 'http.ServerResponse' : 'http.html#class-httpserverresponse' ,
309-
310- 'http2.Http2ServerRequest' : 'http2.html#class-http2http2serverrequest' ,
311- 'http2.Http2ServerResponse' : 'http2.html#class-http2http2serverresponse' ,
312-
313310 'import.meta' : 'esm.html#importmeta' ,
314311
315- 'module.SourceMap' : 'module.html#class-modulesourcemap' ,
316-
317- 'net.BlockList' : 'net.html#class-netblocklist' ,
318- 'net.Server' : 'net.html#class-netserver' ,
319- 'net.Socket' : 'net.html#class-netsocket' ,
320- 'net.SocketAddress' : 'net.html#class-netsocketaddress' ,
321-
322312 'os.constants.dlopen' : 'os.html#dlopen-constants' ,
323313
324- 'readline.Interface' : 'readline.html#class-readlineinterface' ,
325- 'readline.InterfaceConstructor' : 'readline.html#class-interfaceconstructor' ,
326314 'readlinePromises.Interface' : 'readline.html#class-readlinepromisesinterface' ,
327315
328- 'repl.REPLServer' : 'repl.html#class-replserver' ,
329-
330316 require : 'modules.html#requireid' ,
331-
332- 'stream.Duplex' : 'stream.html#class-streamduplex' ,
333- 'stream.Readable' : 'stream.html#class-streamreadable' ,
334- 'stream.Transform' : 'stream.html#class-streamtransform' ,
335- 'stream.Writable' : 'stream.html#class-streamwritable' ,
336-
337- 'tls.SecureContext' : 'tls.html#tlscreatesecurecontextoptions' ,
338- 'tls.Server' : 'tls.html#class-tlsserver' ,
339- 'tls.TLSSocket' : 'tls.html#class-tlstlssocket' ,
340-
341- 'tty.ReadStream' : 'tty.html#class-ttyreadstream' ,
342- 'tty.WriteStream' : 'tty.html#class-ttywritestream' ,
343-
344- 'vm.Module' : 'vm.html#class-vmmodule' ,
345- 'vm.Script' : 'vm.html#class-vmscript' ,
346- 'vm.SourceTextModule' : 'vm.html#class-vmsourcetextmodule' ,
347- 'vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER' :
348- 'vm.html#vmconstantsuse_main_context_default_loader' ,
317+ module : 'modules.html#the-module-object' ,
349318
350319 'zlib options' : 'zlib.html#class-options' ,
320+ 'zstd options' : 'zlib.html#class-zstdoptions' ,
321+
322+ 'HTTP/2 Headers Object' : 'http2.html#headers-object' ,
323+ 'HTTP/2 Settings Object' : 'http2.html#settings-object' ,
351324} ;
352325
353326// This is a mapping for miscellaneous types within the Markdown content and their respective
0 commit comments