forked from tj/node-querystring
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexamples.js
39 lines (26 loc) · 911 Bytes
/
examples.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Module dependencies.
*/
var qs = require('./');
var obj = qs.parse('foo');
require('inspect')(obj)
var obj = qs.parse('foo=bar=baz');
require('inspect')(obj)
var obj = qs.parse('users[]');
require('inspect')(obj)
var obj = qs.parse('name=tj&[email protected]');
require('inspect')(obj)
var obj = qs.parse('users[]=tj&users[]=tobi&users[]=jane');
require('inspect')(obj)
var obj = qs.parse('user[name][first]=tj&user[name][last]=holowaychuk');
require('inspect')(obj)
var obj = qs.parse('users[][name][first]=tj&users[][name][last]=holowaychuk');
require('inspect')(obj)
var obj = qs.parse('a=a&a=b&a=c');
require('inspect')(obj)
var obj = qs.parse('user[tj]=tj&user[tj]=TJ');
require('inspect')(obj)
var obj = qs.parse('user[names]=tj&user[names]=TJ&user[names]=Tyler');
require('inspect')(obj)
var obj = qs.parse('user[name][first]=tj&user[name][first]=TJ');
require('inspect')(obj)