Skip to content

Commit

Permalink
Sync readme.md and index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
decimoseptimo committed Mar 11, 2021
1 parent 7a1dfa9 commit 4c29858
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,15 @@ export interface StringifyOptions {
- `comma`: Serialize arrays by separating elements with comma:
```
import queryString = require('query-string');
const queryString = require('query-string');
queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'});
//=> 'foo=1,2,3'
queryString.stringify({foo: [1, null, '']}, {arrayFormat: 'comma'});
//=> 'foo=1,,'
// Note that typing information for null values is lost
// and `.parse('foo=1,,')` would return `{foo: [1, '', '']}`.
```
- `separator`: Serialize arrays by separating elements with character:
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'});

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

Expand Down

0 comments on commit 4c29858

Please sign in to comment.