mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
Add allowDots config option for qs stringify (#20687)
This commit is contained in:
committed by
Sheetal Nandi
parent
403dbdabc7
commit
b81ccf4769
2
types/qs/index.d.ts
vendored
2
types/qs/index.d.ts
vendored
@@ -5,6 +5,7 @@
|
||||
// Belinda Teh <https://github.com/tehbelinda>
|
||||
// Melvin Lee <https://github.com/zyml>
|
||||
// Arturs Vonda <https://github.com/artursvonda>
|
||||
// Carlos Bonetti <https://github.com/CarlosBonetti>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = QueryString;
|
||||
@@ -25,6 +26,7 @@ declare namespace QueryString {
|
||||
format?: 'RFC1738' | 'RFC3986';
|
||||
encodeValuesOnly?: boolean;
|
||||
addQueryPrefix?: boolean;
|
||||
allowDots?: boolean;
|
||||
}
|
||||
|
||||
interface IParseOptions {
|
||||
|
||||
@@ -287,3 +287,7 @@ qs.parse('a=b&c=d', { delimiter: '&' });
|
||||
() => {
|
||||
assert.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b');
|
||||
}
|
||||
|
||||
() => {
|
||||
assert.equal(qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }), 'a.b.c=d&a.b.e=f');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user