Skip to content

Commit ffbe93b

Browse files
Update README.md
1 parent 14d0f0c commit ffbe93b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ Cookies2.set('name', 'value');
9595

9696
js-cookie provides unobstrusive JSON storage for cookies.
9797

98-
When creating a cookie you can pass an Array or Object Literal instead of a string in the value. If you do so, js-cookie store the string representation of the object according to the `JSON.stringify` api:
98+
When creating a cookie you can pass an Array or Object Literal instead of a string in the value. If you do so, js-cookie store the string representation of the object according to `JSON.stringify`:
9999

100100
```javascript
101101
Cookies.set('name', { foo: 'bar' });
102102
```
103103

104-
When reading a cookie with the default `Cookies.get` api, you receive the stringified representation stored in the cookie:
104+
When reading a cookie with the default `Cookies.get` api, you receive the string representation stored in the cookie:
105105

106106
```javascript
107107
Cookies.get('name'); // => '{"foo":"bar"}'
@@ -111,7 +111,7 @@ Cookies.get('name'); // => '{"foo":"bar"}'
111111
Cookies.get(); // => { name: '{"foo":"bar"}' }
112112
```
113113

114-
When reading a cookie with the `Cookies.getJSON` api, you receive the parsed representation of the string stored in the cookie according to the `JSON.stringify` api:
114+
When reading a cookie with the `Cookies.getJSON` api, you receive the parsed representation of the string stored in the cookie according to `JSON.parse`:
115115

116116
```javascript
117117
Cookies.getJSON('name'); // => { foo: 'bar' }

0 commit comments

Comments
 (0)