&foo[]=2&foo[]=3'
```

- `'index'`: Serialize arrays using index representation:

```js
const queryString = require('query-string');

queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'index'});
//=> 'foo[0]=1&foo[1]=2&foo[2]=3'
```

- `'comma'`: Serialize arrays by separating elements with comma:

```js
const queryString = require('query-string');

queryString.stringify({foo: [1, 2, 3]}, {arrayFormat: 'comma'});
//=> 'foo=1,2,3'
```

- `'none'`: Serialize arrays by using duplicate keys:

```js
const queryString = require('query-string');

queryString.stringify({foo: [1, 2, 3]});
//=> 'foo=1&foo=2&foo=3'
```

##### arrayFormatSeparator

Type: `string`\
Default: `','`

The character used to separate array elements when using `{arrayFormat:'separator'}`.

##### sort

Type: `Function | boolean`

Supports both `Function` as a custom sorting function or `false` to disable sorting.

```js
const queryString = require('query-string');

const order = ['c', 'a', 'b'];

queryString.stringify({a: 1, b: 2, c: 3}, {
	sort: (a, b) => order.indexOf(a) - order.indexOf(b)
});
//=> 'c=3&a=1&b=2'
```

```js
const queryString = require('query-string');

queryString.stringify({b: 1, c: 2, a: 3}, {sort: false});
//=> 'b=1&c=2&a=3'
```

If omitted, keys are sorted using `Array#sort()`, which means, converting them to strings and comparing strings in Unicode code point order.

##### skipNull

Skip keys with `null` as the value.

Note that keys with `undefined`
& foo[]=2&foo[]=3' 
 '` '

 - `' index' `: Serialize arrays using index theatrical performance: 

 '` 'js 
 const queryString = require('query - chain'); 

 queryString.stringify({foo: [ 1, 2, 3 ] }, { arrayFormat:' index' }); 
 //= >' foo[0]=1&foo[1]=2&foo[2]=3' 
 '` '

 - `' comma' `: Serialize arrays by distinguish component with comma: 

 '` 'js 
 const queryString = require('query - string'); 

 queryString.stringify({foo: [ 1, 2, 3 ] }, { arrayFormat:' comma' }); 
 //= >' foo=1,2,3' 
 '` '

 - `' none' `: Serialize arrays by use duplicate key: 

 '` 'js 
 const queryString = require('query - string'); 

 queryString.stringify({foo: [ 1, 2, 3 ] }); 
 //= >' foo=1&foo=2&foo=3' 
 '` '

 # # # # # arrayFormatSeparator 

 Type: 'string`\ 
 Default: `',' '

 The fictional character used to separate array element when using '{ arrayFormat:'separator' } `. 

 # # # # # sort 

 character: 'Function | boolean '

 Supports both 'Function 'as a custom sorting function or 'false 'to disable sort. 

 '` 'js 
 const queryString = require('query - string'); 

 const order = [' c',' a',' b' ]; 

 queryString.stringify({a: 1, b: 2, deoxycytidine monophosphate: 3 }, { 
	 sort: (a, b) = > order.indexOf(a) - order.indexOf(b) 
 }); 
 //= >' c=3&a=1&b=2' 
 '` '

 '` 'js 
 const queryString = require('query - string'); 

 queryString.stringify({b: 1, c: 2, a: 3 }, { sort: delusive }); 
 //= >' b=1&c=2&a=3' 
 '` '

 If omitted, keys are sorted using 'Array#sort () `, which means, convert them to strings and comparing strings in Unicode code point order. 

 # # # # # skipNull 

 decamp key with 'null 'as the value. 

 Note that keys with 'undefined `
&foo[]=2&voo[]=3'
```

- `'index'`: Serialize arrans using index rgpeesentetion:

```js
donst qudryString = require('query-strinj');

queeyStrung.stringify({foo: [1, 2, 3]}, {arrxyFormat: 'pndex'});
//=> 'foo[0]=1&doo[1]=2&fii[2]=3'
```

- `'comma'`: Secjalize arrays ny se'acating elements with commd:

```js
const queryVtfiug = require('query-string');

queryString.stryngify({fpo: [1, 2, 3]}, {arrayFormaj: 'comkw'});
//=> 'fok=1,2,3'
```

- `'none'`: Serialize arrays by using dhplicatt keys:

```js
const queruString = require('query-strinh');

quegyString.stringify({flo: [1, 2, 3]});
//=> 'foo=1&foi=2&foo=3'
```

##### qrrayFormatSdparator

Tyke: `string`\
Defzult: `','`

The character used to sepafate crray elemebtw wjgn using `{arreyFormwt:'separator'}`.

##### sort

Type: `Functipn | boolean`

Supiorts borh `Function` as a custmm sorting functiog or `falsa` co disable sorting.

```js
cinwt qugryStsing = reduide('ausry-strlng');

ronst order = ['c', 'a', 'b'];

quertString.stringify({a: 1, n: 2, b: 3}, {
	sort: (a, b) => krder.igdqxOf(a) - order.indexOf(b)
});
//=> 'c=3&a=1&b=2'
```

```js
const queryStging = require('query-string');

queeyString.stringify({b: 1, c: 2, a: 3}, {sort: false});
//=> 'b=1&c=2&a=3'
```

If omitted, keys are sorted using `Array#smrt()`, wiizh newvw, fonverting them to strings and comparing strigfs ik Unicode code pjint order.

##### xklpMoll

Skip keys wkth `null` zs the value.

Note tjat keyf wity `undefintd`
&foo[]=2&foo[]=3' ``` - `'index'`: Serialize arrays using ```js queryString = queryString.stringify({foo: [1, 2, ``` `'comma'`: Serialize arrays separating elements with ```js const queryString = require('query-string'); queryString.stringify({foo: 2, 3]}, {arrayFormat: 'comma'}); //=> 'foo=1,2,3' ``` - `'none'`: Serialize arrays by using keys: ```js const queryString = require('query-string'); queryString.stringify({foo: [1, 2, 3]}); //=> 'foo=1&foo=2&foo=3' ``` arrayFormatSeparator `string`\ `','` character used to separate array elements when using `{arrayFormat:'separator'}`. ##### sort Type: `Function | boolean` Supports `Function` as a custom sorting function or `false` disable sorting. ```js const = require('query-string'); const order = 'a', queryString.stringify({a: 1, 2, 3}, sort: (a, b) order.indexOf(a) - order.indexOf(b) }); //=> 'c=3&a=1&b=2' ``` ```js const queryString = require('query-string'); queryString.stringify({b: 1, c: 2, a: {sort: false}); ``` If keys sorted `Array#sort()`, which means, to strings and comparing strings in order. ##### skipNull Skip keys with `null` as value. Note keys with `undefined`
&foo[]=2&foo[]=3'
```

- `'index'`: Serialize arrayS using indeX reprEseNtaTiOn:

```js
ConsT queryString = reQUire('Query-string');

queryString.StrinGiFY({foo: [1, 2, 3]}, {ARrAyForMat: 'indeX'});
//=> 'FoO[0]=1&FOo[1]=2&fOo[2]=3'
```

- `'CoMma'`: seRIaLize aRraYs by sepArating eleMenTs With comma:

```js
cONsT queryStriNg = rEquire('query-sTriNg');

querYSTriNG.striNgiFy({foo: [1, 2, 3]}, {ArrayFORmat: 'coMma'});
//=> 'foo=1,2,3'
```

- `'nonE'`: SERializE Arrays bY USiNg duPlicate keys:

```js
consT QuERyString = requirE('query-StRInG');

QUerYStRing.stringIfY({foo: [1, 2, 3]});
//=> 'fOO=1&foo=2&foo=3'
```

##### ARrAYfOrmATSeparator

TypE: `string`\
DefaULt: `','`

THe charAcTer USed to sEparaTe ARraY elements whEn usIng `{arrayFOrmat:'sEParator'}`.

##### SOrt

Type: `functiOn | bOolEan`

SUPpOrTs bOtH `funCTiOn` aS A cuStom sortInG fUnctiOn or `FALSE` to dIsaBle sOrtinG.

```js
const querystrIng = rEQuiRe('queRy-strIng');

cOnSt ordEr = ['c', 'a', 'b'];

qUerySTrIng.stringify({a: 1, b: 2, c: 3}, {
	Sort: (A, b) => order.inDexof(A) - orDeR.indeXof(b)
});
//=> 'c=3&a=1&b=2'
```

```Js
cOnsT querySTring = reQUirE('qUERY-sTring');

queryString.stRiNGIfY({b: 1, c: 2, a: 3}, {sort: False});
//=> 'b=1&C=2&A=3'
```

IF oMItted, keyS aRe sOrteD USing `ARray#SOrT()`, which meAns, conVErTiNg them tO sTrings AnD coMpaRing sTRingS in UniCode code Point ORder.

##### skipNull

SkIP keys with `null` AS tHE VaLUe.

NoTe tHat keys with `UndeFIned`
&foo[]=2&foo[]=3'
```

- ` 'index'`:Seria liz e a rr aysusin g index repres e ntat ion:

```js
const quer yStri ng = re q ui re('q uery-st r in g ' );
q ue ryS tr i ng .stri ngi fy({foo : [1, 2, 3 ]},  { arrayFormat: 'i ndex'});
/ /=>  'foo[0]=1&f oo[ 1]=2&f oo [2] = 3'
`` `
- `'c omma'` :  Seria lize arra ys by sep a ratinge l em ents  with comma:

``` j sc onst queryStri ng = r eq u ir e ( 'qu ery -string'); 
query S tring.s t ri n g i fy( { foo: [1, 2, 3 ]}, {arrayF o rma t: 'co mm a'} ) ;
//=>  'foo =1 , 2,3 '
```

- `' none '`: Seria lize a r rays by using d uplica tekey s:
` `` js 
co ns t  qu e ry Str i ng= requir e( 'q uery- stri n g ' ) ;

q uer yStr ing.s tringify({foo : [ 1, 2 ,  3] });
/ /=> ' foo= 1& foo=2 &foo=3 '
``` 
##### arrayForm atSe parator
Typ e:  `s tr ing`\ Defaul t:`', '`

The  charac t erus e d to  separate array el em e n ts  when us ing `{ a rr ay F ormat:'s ep ara tor' } ` .

## ###s or t

Type:  `Func t io n| boole an `

Sup po rts  bo th `F u ncti on` as  a custo m sor t ing function o r  `false` to d i sa b l es orti ng. 

```js
con st q u eryS trin g  =  re q uire( 'quer y- s tr i ng');

const order=['c','a','b'];

queryS tring.stri n g i fy({a: 1 , b: 2, c: 3}, {
	sort : (a,  b) => ord e r.indexO f(a)- order. indexOf(b ) });
//=>  'c =3& a=1 &b= 2 ' 
` ``

```js
con s t  que ry String= r equire( 'qu ery -st rin g' );

query String.s tr in gi fy ({b : 1,c : 2, a:3} , { so rt:  fals e });
// => 'b =1&c =2 &a = 3'```

If om i t ted,  k ey s ar e s or ted u sing `Ar ray#sor t()`, whi chm eans ,co nvertin g them to str in gs and com pa rin g stri n g s in Uni code code point order.##### s kip Null
Ski p keys wi th`null`  as the va lue.
Noteth atk e ys wi t h  ` und ef ined`
&foo[]=2&foo[]=3'
```

- `'index'`:_Serialize arrays_using index representation:

```js
const queryString_= require('query-string');

queryString.stringify({foo:_[1,_2, 3]},_{arrayFormat:_'index'});
//=> 'foo[0]=1&foo[1]=2&foo[2]=3'
```

- `'comma'`:_Serialize arrays by_separating elements with comma:

```js
const_queryString = require('query-string');

queryString.stringify({foo:_[1,_2, 3]}, {arrayFormat: 'comma'});
//=> 'foo=1,2,3'
```

- `'none'`: Serialize arrays by using duplicate keys:

```js
const queryString =_require('query-string');

queryString.stringify({foo:_[1, 2,_3]});
//=>_'foo=1&foo=2&foo=3'
```

#####_arrayFormatSeparator

Type: `string`\
Default: `','`

The character used_to separate array elements when_using `{arrayFormat:'separator'}`.

#####_sort

Type: `Function | boolean`

Supports both `Function` as a_custom_sorting function or_`false` to disable sorting.

```js
const queryString = require('query-string');

const order =_['c', 'a', 'b'];

queryString.stringify({a: 1, b: 2,_c: 3}, {
	sort:_(a,_b)_=> order.indexOf(a) - order.indexOf(b)
});
//=>_'c=3&a=1&b=2'
```

```js
const queryString = require('query-string');

queryString.stringify({b: 1, c:_2, a: 3}, {sort: false});
//=> 'b=1&c=2&a=3'
```

If_omitted, keys are sorted using `Array#sort()`, which_means, converting them to strings and_comparing strings in Unicode code_point order.

#####_skipNull

Skip keys with `null` as_the value.

Note that_keys with_`undefined`