Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1fe75dc

Browse filesBrowse files
Semigradskyruyadorno
authored andcommitted
doc: unnest mime and MIMEParams from MIMEType constructor
PR-URL: #47950 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 071eaad commit 1fe75dc
Copy full SHA for 1fe75dc

File tree

Expand file treeCollapse file tree

1 file changed

+16
-16
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-16
lines changed
Open diff view settings
Collapse file

‎doc/api/util.md‎

Copy file name to clipboardExpand all lines: doc/api/util.md
+16-16Lines changed: 16 additions & 16 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ console.log(String(myMIME));
10741074
// Prints: text/plain
10751075
```
10761076

1077-
#### `mime.type`
1077+
### `mime.type`
10781078

10791079
* {string}
10801080

@@ -1106,7 +1106,7 @@ console.log(String(myMIME));
11061106
// Prints: application/javascript
11071107
```
11081108

1109-
#### `mime.subtype`
1109+
### `mime.subtype`
11101110

11111111
* {string}
11121112

@@ -1138,7 +1138,7 @@ console.log(String(myMIME));
11381138
// Prints: text/javascript
11391139
```
11401140

1141-
#### `mime.essence`
1141+
### `mime.essence`
11421142

11431143
* {string}
11441144

@@ -1171,15 +1171,15 @@ console.log(String(myMIME));
11711171
// Prints: application/javascript;key=value
11721172
```
11731173

1174-
#### `mime.params`
1174+
### `mime.params`
11751175

11761176
* {MIMEParams}
11771177

11781178
Gets the [`MIMEParams`][] object representing the
11791179
parameters of the MIME. This property is read-only. See
11801180
[`MIMEParams`][] documentation for details.
11811181

1182-
#### `mime.toString()`
1182+
### `mime.toString()`
11831183

11841184
* Returns: {string}
11851185

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

1191-
#### `mime.toJSON()`
1191+
### `mime.toJSON()`
11921192

11931193
* Returns: {string}
11941194

@@ -1219,7 +1219,7 @@ console.log(JSON.stringify(myMIMES));
12191219
// Prints: ["image/png", "image/gif"]
12201220
```
12211221

1222-
### Class: `util.MIMEParams`
1222+
## Class: `util.MIMEParams`
12231223

12241224
<!-- YAML
12251225
added: v18.13.0
@@ -1228,7 +1228,7 @@ added: v18.13.0
12281228
The `MIMEParams` API provides read and write access to the parameters of a
12291229
`MIMEType`.
12301230

1231-
#### Constructor: `new MIMEParams()`
1231+
### Constructor: `new MIMEParams()`
12321232

12331233
Creates a new `MIMEParams` object by with empty parameters
12341234

@@ -1244,21 +1244,21 @@ const { MIMEParams } = require('node:util');
12441244
const myParams = new MIMEParams();
12451245
```
12461246

1247-
#### `mimeParams.delete(name)`
1247+
### `mimeParams.delete(name)`
12481248

12491249
* `name` {string}
12501250

12511251
Remove all name-value pairs whose name is `name`.
12521252

1253-
#### `mimeParams.entries()`
1253+
### `mimeParams.entries()`
12541254

12551255
* Returns: {Iterator}
12561256

12571257
Returns an iterator over each of the name-value pairs in the parameters.
12581258
Each item of the iterator is a JavaScript `Array`. The first item of the array
12591259
is the `name`, the second item of the array is the `value`.
12601260

1261-
#### `mimeParams.get(name)`
1261+
### `mimeParams.get(name)`
12621262

12631263
* `name` {string}
12641264
* Returns: {string} or `null` if there is no name-value pair with the given
@@ -1267,14 +1267,14 @@ is the `name`, the second item of the array is the `value`.
12671267
Returns the value of the first name-value pair whose name is `name`. If there
12681268
are no such pairs, `null` is returned.
12691269

1270-
#### `mimeParams.has(name)`
1270+
### `mimeParams.has(name)`
12711271

12721272
* `name` {string}
12731273
* Returns: {boolean}
12741274

12751275
Returns `true` if there is at least one name-value pair whose name is `name`.
12761276

1277-
#### `mimeParams.keys()`
1277+
### `mimeParams.keys()`
12781278

12791279
* Returns: {Iterator}
12801280

@@ -1304,7 +1304,7 @@ for (const name of params.keys()) {
13041304
// bar
13051305
```
13061306

1307-
#### `mimeParams.set(name, value)`
1307+
### `mimeParams.set(name, value)`
13081308

13091309
* `name` {string}
13101310
* `value` {string}
@@ -1333,13 +1333,13 @@ console.log(params.toString());
13331333
// Prints: foo=def&bar=1&baz=xyz
13341334
```
13351335

1336-
#### `mimeParams.values()`
1336+
### `mimeParams.values()`
13371337

13381338
* Returns: {Iterator}
13391339

13401340
Returns an iterator over the values of each name-value pair.
13411341

1342-
#### `mimeParams[@@iterator]()`
1342+
### `mimeParams[@@iterator]()`
13431343

13441344
* Returns: {Iterator}
13451345

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.