Skip to content

Commit 4c29858

Browse files
committed
Sync readme.md and index.d.ts
1 parent 7a1dfa9 commit 4c29858

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,15 @@ export interface StringifyOptions {
225225
- `comma`: Serialize arrays by separating elements with comma:
226226
227227
```
228-
import queryString = require('query-string');
228+
const queryString = require('query-string');
229229
230230
queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'});
231231
//=> 'foo=1,2,3'
232+
233+
queryString.stringify({foo: [1, null, '']}, {arrayFormat: 'comma'});
234+
//=> 'foo=1,,'
235+
// Note that typing information for null values is lost
236+
// and `.parse('foo=1,,')` would return `{foo: [1, '', '']}`.
232237
```
233238
234239
- `separator`: Serialize arrays by separating elements with character:

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'});
231231

232232
queryString.stringify({foo: [1, null, '']}, {arrayFormat: 'comma'});
233233
//=> 'foo=1,,'
234-
// Note that typing information for null values are lost
234+
// Note that typing information for null values is lost
235235
// and `.parse('foo=1,,')` would return `{foo: [1, '', '']}`.
236236
```
237237

0 commit comments

Comments
 (0)