File tree 7 files changed +14
-24
lines changed
7 files changed +14
-24
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ calling `require('node:crypto')` will result in an error being thrown.
42
42
43
43
When using CommonJS, the error thrown can be caught using try/catch:
44
44
45
- <!-- eslint-skip -->
45
+ <!-- eslint-disable no-global-assign -->
46
46
47
47
``` cjs
48
48
let crypto;
53
53
}
54
54
```
55
55
56
+ <!-- eslint-enable no-global-assign -->
57
+
56
58
When using the lexical ESM ` import ` keyword, the error can only be
57
59
caught if a handler for ` process.on('uncaughtException') ` is registered
58
60
_ before_ any attempt to load the module is made (using, for instance,
Original file line number Diff line number Diff line change @@ -2940,9 +2940,7 @@ signal (such as [`subprocess.kill()`][]).
2940
2940
[ self-reference a package using its name] [ ] and [ define a custom subpath] [ ] in
2941
2941
the [ ` "exports" ` ] [ ] field of the [ ` package.json ` ] [ ] file.
2942
2942
2943
- <!-- eslint-skip -->
2944
-
2945
- ``` js
2943
+ ``` mjs
2946
2944
import ' ./' ; // unsupported
2947
2945
import ' ./index.js' ; // supported
2948
2946
import ' package-name' ; // supported
Original file line number Diff line number Diff line change @@ -16,14 +16,12 @@ user is able to stream data.
16
16
17
17
HTTP message headers are represented by an object like this:
18
18
19
- <!-- eslint-skip -->
20
-
21
- ``` js
22
- { ' content-length' : ' 123' ,
23
- ' content-type' : ' text/plain' ,
24
- ' connection' : ' keep-alive' ,
25
- ' host' : ' example.com' ,
26
- ' accept' : ' */*' }
19
+ ``` json
20
+ { "content-length" : " 123" ,
21
+ "content-type" : " text/plain" ,
22
+ "connection" : " keep-alive" ,
23
+ "host" : " example.com" ,
24
+ "accept" : " */*" }
27
25
```
28
26
29
27
Keys are lowercased. Values are not modified.
Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ calling `require('node:https')` will result in an error being thrown.
17
17
18
18
When using CommonJS, the error thrown can be caught using try/catch:
19
19
20
- <!-- eslint-skip -->
21
-
22
20
``` cjs
23
21
let https;
24
22
try {
Original file line number Diff line number Diff line change @@ -87,12 +87,10 @@ collection of key and value pairs.
87
87
88
88
For example, the query string ` 'foo=bar&abc=xyz&abc=123' ` is parsed into:
89
89
90
- <!-- eslint-skip -->
91
-
92
- ``` js
90
+ ``` json
93
91
{
94
- foo: ' bar' ,
95
- abc: [' xyz' , ' 123' ]
92
+ " foo" : " bar" ,
93
+ " abc" : [" xyz" , " 123" ]
96
94
}
97
95
```
98
96
Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ calling `require('node:tls')` will result in an error being thrown.
22
22
23
23
When using CommonJS, the error thrown can be caught using try/catch:
24
24
25
- <!-- eslint-skip -->
26
-
27
25
``` cjs
28
26
let tls;
29
27
try {
Original file line number Diff line number Diff line change @@ -2513,9 +2513,7 @@ added: v10.0.0
2513
2513
2514
2514
Returns ` true ` if the value is an instance of a [Module Namespace Object][].
2515
2515
2516
- <!-- eslint-skip -->
2517
-
2518
- ` ` ` js
2516
+ ` ` ` mjs
2519
2517
import * as ns from ' ./a.js' ;
2520
2518
2521
2519
util .types .isModuleNamespaceObject (ns); // Returns true
You can’t perform that action at this time.
0 commit comments