Skip to content

Commit ca2ae86

Browse files
SemigradskyRafaelGSS
authored andcommitted
doc: unnest mime and MIMEParams from MIMEType constructor
PR-URL: #47950 Reviewed-By: Luigi Pinca <[email protected]>
1 parent f0709fd commit ca2ae86

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

doc/api/util.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ console.log(String(myMIME));
10801080
// Prints: text/plain
10811081
```
10821082

1083-
#### `mime.type`
1083+
### `mime.type`
10841084

10851085
* {string}
10861086

@@ -1112,7 +1112,7 @@ console.log(String(myMIME));
11121112
// Prints: application/javascript
11131113
```
11141114

1115-
#### `mime.subtype`
1115+
### `mime.subtype`
11161116

11171117
* {string}
11181118

@@ -1144,7 +1144,7 @@ console.log(String(myMIME));
11441144
// Prints: text/javascript
11451145
```
11461146

1147-
#### `mime.essence`
1147+
### `mime.essence`
11481148

11491149
* {string}
11501150

@@ -1177,15 +1177,15 @@ console.log(String(myMIME));
11771177
// Prints: application/javascript;key=value
11781178
```
11791179

1180-
#### `mime.params`
1180+
### `mime.params`
11811181

11821182
* {MIMEParams}
11831183

11841184
Gets the [`MIMEParams`][] object representing the
11851185
parameters of the MIME. This property is read-only. See
11861186
[`MIMEParams`][] documentation for details.
11871187

1188-
#### `mime.toString()`
1188+
### `mime.toString()`
11891189

11901190
* Returns: {string}
11911191

@@ -1194,7 +1194,7 @@ The `toString()` method on the `MIMEType` object returns the serialized MIME.
11941194
Because of the need for standard compliance, this method does not allow users
11951195
to customize the serialization process of the MIME.
11961196

1197-
#### `mime.toJSON()`
1197+
### `mime.toJSON()`
11981198

11991199
* Returns: {string}
12001200

@@ -1225,7 +1225,7 @@ console.log(JSON.stringify(myMIMES));
12251225
// Prints: ["image/png", "image/gif"]
12261226
```
12271227

1228-
### Class: `util.MIMEParams`
1228+
## Class: `util.MIMEParams`
12291229

12301230
<!-- YAML
12311231
added:
@@ -1236,7 +1236,7 @@ added:
12361236
The `MIMEParams` API provides read and write access to the parameters of a
12371237
`MIMEType`.
12381238

1239-
#### Constructor: `new MIMEParams()`
1239+
### Constructor: `new MIMEParams()`
12401240

12411241
Creates a new `MIMEParams` object by with empty parameters
12421242

@@ -1252,21 +1252,21 @@ const { MIMEParams } = require('node:util');
12521252
const myParams = new MIMEParams();
12531253
```
12541254

1255-
#### `mimeParams.delete(name)`
1255+
### `mimeParams.delete(name)`
12561256

12571257
* `name` {string}
12581258

12591259
Remove all name-value pairs whose name is `name`.
12601260

1261-
#### `mimeParams.entries()`
1261+
### `mimeParams.entries()`
12621262

12631263
* Returns: {Iterator}
12641264

12651265
Returns an iterator over each of the name-value pairs in the parameters.
12661266
Each item of the iterator is a JavaScript `Array`. The first item of the array
12671267
is the `name`, the second item of the array is the `value`.
12681268

1269-
#### `mimeParams.get(name)`
1269+
### `mimeParams.get(name)`
12701270

12711271
* `name` {string}
12721272
* Returns: {string} or `null` if there is no name-value pair with the given
@@ -1275,14 +1275,14 @@ is the `name`, the second item of the array is the `value`.
12751275
Returns the value of the first name-value pair whose name is `name`. If there
12761276
are no such pairs, `null` is returned.
12771277

1278-
#### `mimeParams.has(name)`
1278+
### `mimeParams.has(name)`
12791279

12801280
* `name` {string}
12811281
* Returns: {boolean}
12821282

12831283
Returns `true` if there is at least one name-value pair whose name is `name`.
12841284

1285-
#### `mimeParams.keys()`
1285+
### `mimeParams.keys()`
12861286

12871287
* Returns: {Iterator}
12881288

@@ -1312,7 +1312,7 @@ for (const name of params.keys()) {
13121312
// bar
13131313
```
13141314

1315-
#### `mimeParams.set(name, value)`
1315+
### `mimeParams.set(name, value)`
13161316

13171317
* `name` {string}
13181318
* `value` {string}
@@ -1341,13 +1341,13 @@ console.log(params.toString());
13411341
// Prints: foo=def&bar=1&baz=xyz
13421342
```
13431343

1344-
#### `mimeParams.values()`
1344+
### `mimeParams.values()`
13451345

13461346
* Returns: {Iterator}
13471347

13481348
Returns an iterator over the values of each name-value pair.
13491349

1350-
#### `mimeParams[@@iterator]()`
1350+
### `mimeParams[@@iterator]()`
13511351

13521352
* Returns: {Iterator}
13531353

0 commit comments

Comments
 (0)