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
@@ -94,6 +104,7 @@ export const DOC_TYPES_MAPPING_GLOBALS = {
94104 'WeakSet' ,
95105
96106 'TypedArray' ,
107+ 'Float16Array' ,
97108 'Float32Array' ,
98109 'Float64Array' ,
99110 'Int8Array' ,
@@ -127,6 +138,7 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
127138 AesGcmParams : 'webcrypto.html#class-aesgcmparams' ,
128139 AesKeyAlgorithm : 'webcrypto.html#class-aeskeyalgorithm' ,
129140 AesKeyGenParams : 'webcrypto.html#class-aeskeygenparams' ,
141+ AesDerivedKeyParams : 'webcrypto.html#class-aesderivedkeyparams' ,
130142
131143 Blob : 'buffer.html#class-blob' ,
132144 BroadcastChannel :
@@ -138,6 +150,8 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
138150 Channel : 'diagnostics_channel.html#class-channel' ,
139151 ChildProcess : 'child_process.html#class-childprocess' ,
140152 Cipher : 'crypto.html#class-cipher' ,
153+ Cipheriv : 'crypto.html#class-cipheriv' ,
154+ Decipheriv : 'crypto.html#class-decipheriv' ,
141155 ClientHttp2Session : 'http2.html#class-clienthttp2session' ,
142156 ClientHttp2Stream : 'http2.html#class-clienthttp2stream' ,
143157
@@ -191,6 +205,8 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
191205 IntervalHistogram :
192206 'perf_hooks.html#class-intervalhistogram-extends-histogram' ,
193207
208+ LockManager : 'worker_threads.html#class-lockmanager' ,
209+
194210 KeyAlgorithm : 'webcrypto.html#class-keyalgorithm' ,
195211 KeyObject : 'crypto.html#class-keyobject' ,
196212
@@ -219,6 +235,10 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
219235 ReadableStreamDefaultReader :
220236 'webstreams.html#class-readablestreamdefaultreader' ,
221237
238+ ModuleRequest : 'vm.html#type-modulerequest' ,
239+
240+ DatabaseSync : 'sqlite.html#class-databasesync' ,
241+
222242 RecordableHistogram :
223243 'perf_hooks.html#class-recordablehistogram-extends-histogram' ,
224244
@@ -233,6 +253,10 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
233253
234254 Sign : 'crypto.html#class-sign' ,
235255
256+ Disposable :
257+ 'https://tc39.es/proposal-explicit-resource-management/#sec-disposable-interface' ,
258+
259+ Session : 'sqlite.html#class-session' ,
236260 StatementSync : 'sqlite.html#class-statementsync' ,
237261
238262 Stream : 'stream.html#stream' ,
@@ -273,71 +297,20 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
273297
274298 'brotli options' : 'zlib.html#class-brotlioptions' ,
275299
276- 'cluster.Worker' : 'cluster.html#class-worker' ,
277-
278- 'crypto.constants' : 'crypto.html#cryptoconstants' ,
279-
280- 'dgram.Socket' : 'dgram.html#class-dgramsocket' ,
281-
282- 'errors.Error' : 'errors.html#class-error' ,
283-
284- 'fs.Dir' : 'fs.html#class-fsdir' ,
285- 'fs.Dirent' : 'fs.html#class-fsdirent' ,
286- 'fs.FSWatcher' : 'fs.html#class-fsfswatcher' ,
287- 'fs.ReadStream' : 'fs.html#class-fsreadstream' ,
288- 'fs.StatFs' : 'fs.html#class-fsstatfs' ,
289- 'fs.Stats' : 'fs.html#class-fsstats' ,
290- 'fs.StatWatcher' : 'fs.html#class-fsstatwatcher' ,
291- 'fs.WriteStream' : 'fs.html#class-fswritestream' ,
292-
293- 'http.Agent' : 'http.html#class-httpagent' ,
294- 'http.ClientRequest' : 'http.html#class-httpclientrequest' ,
295- 'http.IncomingMessage' : 'http.html#class-httpincomingmessage' ,
296- 'http.OutgoingMessage' : 'http.html#class-httpoutgoingmessage' ,
297- 'http.Server' : 'http.html#class-httpserver' ,
298- 'http.ServerResponse' : 'http.html#class-httpserverresponse' ,
299-
300- 'http2.Http2ServerRequest' : 'http2.html#class-http2http2serverrequest' ,
301- 'http2.Http2ServerResponse' : 'http2.html#class-http2http2serverresponse' ,
302-
303300 'import.meta' : 'esm.html#importmeta' ,
304301
305- 'module.SourceMap' : 'module.html#class-modulesourcemap' ,
306-
307- 'net.BlockList' : 'net.html#class-netblocklist' ,
308- 'net.Server' : 'net.html#class-netserver' ,
309- 'net.Socket' : 'net.html#class-netsocket' ,
310- 'net.SocketAddress' : 'net.html#class-netsocketaddress' ,
311-
312302 'os.constants.dlopen' : 'os.html#dlopen-constants' ,
313303
314- 'readline.Interface' : 'readline.html#class-readlineinterface' ,
315- 'readline.InterfaceConstructor' : 'readline.html#class-interfaceconstructor' ,
316304 'readlinePromises.Interface' : 'readline.html#class-readlinepromisesinterface' ,
317305
318- 'repl.REPLServer' : 'repl.html#class-replserver' ,
319-
320306 require : 'modules.html#requireid' ,
321-
322- 'stream.Duplex' : 'stream.html#class-streamduplex' ,
323- 'stream.Readable' : 'stream.html#class-streamreadable' ,
324- 'stream.Transform' : 'stream.html#class-streamtransform' ,
325- 'stream.Writable' : 'stream.html#class-streamwritable' ,
326-
327- 'tls.SecureContext' : 'tls.html#tlscreatesecurecontextoptions' ,
328- 'tls.Server' : 'tls.html#class-tlsserver' ,
329- 'tls.TLSSocket' : 'tls.html#class-tlstlssocket' ,
330-
331- 'tty.ReadStream' : 'tty.html#class-ttyreadstream' ,
332- 'tty.WriteStream' : 'tty.html#class-ttywritestream' ,
333-
334- 'vm.Module' : 'vm.html#class-vmmodule' ,
335- 'vm.Script' : 'vm.html#class-vmscript' ,
336- 'vm.SourceTextModule' : 'vm.html#class-vmsourcetextmodule' ,
337- 'vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER' :
338- 'vm.html#vmconstantsuse_main_context_default_loader' ,
307+ module : 'modules.html#the-module-object' ,
339308
340309 'zlib options' : 'zlib.html#class-options' ,
310+ 'zstd options' : 'zlib.html#class-zstdoptions' ,
311+
312+ 'HTTP/2 Headers Object' : 'http2.html#headers-object' ,
313+ 'HTTP/2 Settings Object' : 'http2.html#settings-object' ,
341314} ;
342315
343316// This is a mapping for miscellaneous types within the Markdown content and their respective
0 commit comments