1
1
'use strict' ;
2
2
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
+
3
13
// This is the base URL of the MDN Web documentation
4
14
export const DOC_MDN_BASE_URL = 'https://developer.mozilla.org/en-US/docs/Web/' ;
5
15
@@ -104,6 +114,7 @@ export const DOC_TYPES_MAPPING_GLOBALS = {
104
114
'WeakSet' ,
105
115
106
116
'TypedArray' ,
117
+ 'Float16Array' ,
107
118
'Float32Array' ,
108
119
'Float64Array' ,
109
120
'Int8Array' ,
@@ -137,6 +148,7 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
137
148
AesGcmParams : 'webcrypto.html#class-aesgcmparams' ,
138
149
AesKeyAlgorithm : 'webcrypto.html#class-aeskeyalgorithm' ,
139
150
AesKeyGenParams : 'webcrypto.html#class-aeskeygenparams' ,
151
+ AesDerivedKeyParams : 'webcrypto.html#class-aesderivedkeyparams' ,
140
152
141
153
Blob : 'buffer.html#class-blob' ,
142
154
BroadcastChannel :
@@ -148,6 +160,8 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
148
160
Channel : 'diagnostics_channel.html#class-channel' ,
149
161
ChildProcess : 'child_process.html#class-childprocess' ,
150
162
Cipher : 'crypto.html#class-cipher' ,
163
+ Cipheriv : 'crypto.html#class-cipheriv' ,
164
+ Decipheriv : 'crypto.html#class-decipheriv' ,
151
165
ClientHttp2Session : 'http2.html#class-clienthttp2session' ,
152
166
ClientHttp2Stream : 'http2.html#class-clienthttp2stream' ,
153
167
@@ -201,6 +215,8 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
201
215
IntervalHistogram :
202
216
'perf_hooks.html#class-intervalhistogram-extends-histogram' ,
203
217
218
+ LockManager : 'worker_threads.html#class-lockmanager' ,
219
+
204
220
KeyAlgorithm : 'webcrypto.html#class-keyalgorithm' ,
205
221
KeyObject : 'crypto.html#class-keyobject' ,
206
222
@@ -229,6 +245,10 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
229
245
ReadableStreamDefaultReader :
230
246
'webstreams.html#class-readablestreamdefaultreader' ,
231
247
248
+ ModuleRequest : 'vm.html#type-modulerequest' ,
249
+
250
+ DatabaseSync : 'sqlite.html#class-databasesync' ,
251
+
232
252
RecordableHistogram :
233
253
'perf_hooks.html#class-recordablehistogram-extends-histogram' ,
234
254
@@ -243,6 +263,10 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
243
263
244
264
Sign : 'crypto.html#class-sign' ,
245
265
266
+ Disposable :
267
+ 'https://tc39.es/proposal-explicit-resource-management/#sec-disposable-interface' ,
268
+
269
+ Session : 'sqlite.html#class-session' ,
246
270
StatementSync : 'sqlite.html#class-statementsync' ,
247
271
248
272
Stream : 'stream.html#stream' ,
@@ -283,71 +307,20 @@ export const DOC_TYPES_MAPPING_NODE_MODULES = {
283
307
284
308
'brotli options' : 'zlib.html#class-brotlioptions' ,
285
309
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
-
313
310
'import.meta' : 'esm.html#importmeta' ,
314
311
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
-
322
312
'os.constants.dlopen' : 'os.html#dlopen-constants' ,
323
313
324
- 'readline.Interface' : 'readline.html#class-readlineinterface' ,
325
- 'readline.InterfaceConstructor' : 'readline.html#class-interfaceconstructor' ,
326
314
'readlinePromises.Interface' : 'readline.html#class-readlinepromisesinterface' ,
327
315
328
- 'repl.REPLServer' : 'repl.html#class-replserver' ,
329
-
330
316
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' ,
349
318
350
319
'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' ,
351
324
} ;
352
325
353
326
// This is a mapping for miscellaneous types within the Markdown content and their respective
0 commit comments