Skip to content

Commit 951353e

Browse files
Simplify the "converters" docs
Only document the "read converter" as a property when using along with the "write converter".
1 parent 5fae39d commit 951353e

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -236,24 +236,17 @@ cookies.get('default'); // 北
236236
cookies.get(); // { escaped: '北', default: '北' }
237237
```
238238

239-
You can also pass an Object Literal:
240-
241-
```javascript
242-
Cookies.withConverter({
243-
read: function (value, name) {
244-
// Convert
245-
}
246-
});
247-
```
248-
249239
### Write
250240

251241
Create a new instance of the api that overrides the default encoding implementation:
252242

253243
```javascript
254244
Cookies.withConverter({
245+
read: function (value, name) {
246+
// Read converter
247+
},
255248
write: function (value, name) {
256-
// Convert
249+
// Write converter
257250
}
258251
});
259252
```

0 commit comments

Comments
 (0)