Skip to content

Commit 64653ef

Browse files
committed
Fixup changelog
1 parent e24f757 commit 64653ef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/headers/CHANGELOG.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Similarly, the constructor no longer accepts non-string values in an array init
2727
let headers = new SuperHeaders([['Content-Type', { mediaType: 'text/html' }]]);
2828

2929
// if you need the previous behavior, use the object init instead
30-
let headers = new SuperHeaders({ contentType: 'text/html' });
30+
let headers = new SuperHeaders({ contentType: { mediaType: 'text/html' } });
3131
```
3232

3333
- BREAKING CHANGE: `headers.get()` returns `null` for uninitialized custom header values instead of `undefined`. This follows the native `Headers` interface more closely.
@@ -43,7 +43,7 @@ headers.get('Host'); // null
4343
headers.get('Content-Type'); // null
4444
```
4545

46-
- BREAKING CHANGE: Removed ability to initialize `AcceptLanguage` with `undefined` quality values.
46+
- BREAKING CHANGE: Removed ability to initialize `AcceptLanguage` with `undefined` weight values.
4747

4848
```ts
4949
// before
@@ -65,11 +65,12 @@ headers.contentType = null; // same as headers.delete('Content-Type');
6565
headers.contentType; // null
6666
```
6767

68-
- Allow setting date values (`date`, `expires`, `ifModifiedSince`, `ifUnmodifiedSince`, and `lastModified`) using numbers.
68+
- Allow setting date headers (`date`, `expires`, `ifModifiedSince`, `ifUnmodifiedSince`, and `lastModified`) using numbers.
6969

7070
```ts
7171
let ms = new Date().getTime();
7272
let headers = new SuperHeaders({ lastModified: ms });
73+
headers.date = ms;
7374
```
7475

7576
- Added `AcceptLanguage.prototype.accepts(language)`, `AcceptLanguage.prototype.getWeight(language)`,

0 commit comments

Comments
 (0)