qs 6.0.0 → 6.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/qs.js CHANGED
@@ -1,28 +1,19 @@
1
1
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
- // Load modules
2
+ 'use strict';
3
3
 
4
4
  var Stringify = require('./stringify');
5
5
  var Parse = require('./parse');
6
6
 
7
-
8
- // Declare internals
9
-
10
- var internals = {};
11
-
12
-
13
7
  module.exports = {
14
8
  stringify: Stringify,
15
9
  parse: Parse
16
10
  };
17
11
 
18
12
  },{"./parse":2,"./stringify":3}],2:[function(require,module,exports){
19
- // Load modules
13
+ 'use strict';
20
14
 
21
15
  var Utils = require('./utils');
22
16
 
23
-
24
- // Declare internals
25
-
26
17
  var internals = {
27
18
  delimiter: '&',
28
19
  depth: 5,
@@ -34,13 +25,13 @@ var internals = {
34
25
  allowDots: false
35
26
  };
36
27
 
28
+ var has = Object.prototype.hasOwnProperty;
37
29
 
38
30
  internals.parseValues = function (str, options) {
39
-
40
31
  var obj = {};
41
32
  var parts = str.split(options.delimiter, options.parameterLimit === Infinity ? undefined : options.parameterLimit);
42
33
 
43
- for (var i = 0, il = parts.length; i < il; ++i) {
34
+ for (var i = 0; i < parts.length; ++i) {
44
35
  var part = parts[i];
45
36
  var pos = part.indexOf(']=') === -1 ? part.indexOf('=') : part.indexOf(']=') + 1;
46
37
 
@@ -50,16 +41,14 @@ internals.parseValues = function (str, options) {
50
41
  if (options.strictNullHandling) {
51
42
  obj[Utils.decode(part)] = null;
52
43
  }
53
- }
54
- else {
44
+ } else {
55
45
  var key = Utils.decode(part.slice(0, pos));
56
46
  var val = Utils.decode(part.slice(pos + 1));
57
47
 
58
- if (!Object.prototype.hasOwnProperty.call(obj, key)) {
59
- obj[key] = val;
60
- }
61
- else {
48
+ if (has.call(obj, key)) {
62
49
  obj[key] = [].concat(obj[key]).concat(val);
50
+ } else {
51
+ obj[key] = val;
63
52
  }
64
53
  }
65
54
  }
@@ -67,9 +56,7 @@ internals.parseValues = function (str, options) {
67
56
  return obj;
68
57
  };
69
58
 
70
-
71
59
  internals.parseObject = function (chain, val, options) {
72
-
73
60
  if (!chain.length) {
74
61
  return val;
75
62
  }
@@ -80,23 +67,20 @@ internals.parseObject = function (chain, val, options) {
80
67
  if (root === '[]') {
81
68
  obj = [];
82
69
  obj = obj.concat(internals.parseObject(chain, val, options));
83
- }
84
- else {
70
+ } else {
85
71
  obj = options.plainObjects ? Object.create(null) : {};
86
- var cleanRoot = root[0] === '[' && root[root.length - 1] === ']' ? root.slice(1, root.length - 1) : root;
72
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
87
73
  var index = parseInt(cleanRoot, 10);
88
- var indexString = '' + index;
89
- if (!isNaN(index) &&
74
+ if (
75
+ !isNaN(index) &&
90
76
  root !== cleanRoot &&
91
- indexString === cleanRoot &&
77
+ String(index) === cleanRoot &&
92
78
  index >= 0 &&
93
- (options.parseArrays &&
94
- index <= options.arrayLimit)) {
95
-
79
+ (options.parseArrays && index <= options.arrayLimit)
80
+ ) {
96
81
  obj = [];
97
82
  obj[index] = internals.parseObject(chain, val, options);
98
- }
99
- else {
83
+ } else {
100
84
  obj[cleanRoot] = internals.parseObject(chain, val, options);
101
85
  }
102
86
  }
@@ -104,56 +88,47 @@ internals.parseObject = function (chain, val, options) {
104
88
  return obj;
105
89
  };
106
90
 
107
-
108
- internals.parseKeys = function (key, val, options) {
109
-
110
- if (!key) {
91
+ internals.parseKeys = function (givenKey, val, options) {
92
+ if (!givenKey) {
111
93
  return;
112
94
  }
113
95
 
114
96
  // Transform dot notation to bracket notation
115
-
116
- if (options.allowDots) {
117
- key = key.replace(/\.([^\.\[]+)/g, '[$1]');
118
- }
97
+ var key = options.allowDots ? givenKey.replace(/\.([^\.\[]+)/g, '[$1]') : givenKey;
119
98
 
120
99
  // The regex chunks
121
100
 
122
- var parent = /^([^\[\]]*)/;
123
- var child = /(\[[^\[\]]*\])/g;
101
+ var brackets = /(\[[^[\]]*])/;
102
+ var child = /(\[[^[\]]*])/g;
124
103
 
125
104
  // Get the parent
126
105
 
127
- var segment = parent.exec(key);
106
+ var segment = brackets.exec(key);
107
+ var parent = segment ? key.slice(0, segment.index) : key;
128
108
 
129
109
  // Stash the parent if it exists
130
110
 
131
111
  var keys = [];
132
- if (segment[1]) {
112
+ if (parent) {
133
113
  // If we aren't using plain objects, optionally prefix keys
134
114
  // that would overwrite object prototype properties
135
- if (!options.plainObjects &&
136
- Object.prototype.hasOwnProperty(segment[1])) {
137
-
115
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
138
116
  if (!options.allowPrototypes) {
139
117
  return;
140
118
  }
141
119
  }
142
120
 
143
- keys.push(segment[1]);
121
+ keys.push(parent);
144
122
  }
145
123
 
146
124
  // Loop through children appending to the array until we hit depth
147
125
 
148
126
  var i = 0;
149
127
  while ((segment = child.exec(key)) !== null && i < options.depth) {
150
-
151
- ++i;
152
- if (!options.plainObjects &&
153
- Object.prototype.hasOwnProperty(segment[1].replace(/\[|\]/g, ''))) {
154
-
128
+ i += 1;
129
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
155
130
  if (!options.allowPrototypes) {
156
- continue;
131
+ return;
157
132
  }
158
133
  }
159
134
  keys.push(segment[1]);
@@ -168,10 +143,8 @@ internals.parseKeys = function (key, val, options) {
168
143
  return internals.parseObject(keys, val, options);
169
144
  };
170
145
 
171
-
172
- module.exports = function (str, options) {
173
-
174
- options = options || {};
146
+ module.exports = function (str, opts) {
147
+ var options = opts || {};
175
148
  options.delimiter = typeof options.delimiter === 'string' || Utils.isRegExp(options.delimiter) ? options.delimiter : internals.delimiter;
176
149
  options.depth = typeof options.depth === 'number' ? options.depth : internals.depth;
177
150
  options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : internals.arrayLimit;
@@ -182,10 +155,11 @@ module.exports = function (str, options) {
182
155
  options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : internals.parameterLimit;
183
156
  options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
184
157
 
185
- if (str === '' ||
158
+ if (
159
+ str === '' ||
186
160
  str === null ||
187
- typeof str === 'undefined') {
188
-
161
+ typeof str === 'undefined'
162
+ ) {
189
163
  return options.plainObjects ? Object.create(null) : {};
190
164
  }
191
165
 
@@ -195,7 +169,7 @@ module.exports = function (str, options) {
195
169
  // Iterate over the keys and setup the new object
196
170
 
197
171
  var keys = Object.keys(tempObj);
198
- for (var i = 0, il = keys.length; i < il; ++i) {
172
+ for (var i = 0; i < keys.length; ++i) {
199
173
  var key = keys[i];
200
174
  var newObj = internals.parseKeys(key, tempObj[key], options);
201
175
  obj = Utils.merge(obj, newObj, options);
@@ -205,26 +179,20 @@ module.exports = function (str, options) {
205
179
  };
206
180
 
207
181
  },{"./utils":4}],3:[function(require,module,exports){
208
- // Load modules
182
+ 'use strict';
209
183
 
210
184
  var Utils = require('./utils');
211
185
 
212
-
213
- // Declare internals
214
-
215
186
  var internals = {
216
187
  delimiter: '&',
217
188
  arrayPrefixGenerators: {
218
- brackets: function (prefix, key) {
219
-
189
+ brackets: function (prefix) {
220
190
  return prefix + '[]';
221
191
  },
222
192
  indices: function (prefix, key) {
223
-
224
193
  return prefix + '[' + key + ']';
225
194
  },
226
- repeat: function (prefix, key) {
227
-
195
+ repeat: function (prefix) {
228
196
  return prefix;
229
197
  }
230
198
  },
@@ -233,19 +201,15 @@ var internals = {
233
201
  encode: true
234
202
  };
235
203
 
236
-
237
- internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {
238
-
204
+ internals.stringify = function (object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encode, filter, sort) {
205
+ var obj = object;
239
206
  if (typeof filter === 'function') {
240
207
  obj = filter(prefix, obj);
241
- }
242
- else if (Utils.isBuffer(obj)) {
243
- obj = obj.toString();
244
- }
245
- else if (obj instanceof Date) {
208
+ } else if (Utils.isBuffer(obj)) {
209
+ obj = String(obj);
210
+ } else if (obj instanceof Date) {
246
211
  obj = obj.toISOString();
247
- }
248
- else if (obj === null) {
212
+ } else if (obj === null) {
249
213
  if (strictNullHandling) {
250
214
  return encode ? Utils.encode(prefix) : prefix;
251
215
  }
@@ -253,10 +217,7 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand
253
217
  obj = '';
254
218
  }
255
219
 
256
- if (typeof obj === 'string' ||
257
- typeof obj === 'number' ||
258
- typeof obj === 'boolean') {
259
-
220
+ if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean') {
260
221
  if (encode) {
261
222
  return [Utils.encode(prefix) + '=' + Utils.encode(obj)];
262
223
  }
@@ -277,19 +238,16 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand
277
238
  objKeys = sort ? keys.sort(sort) : keys;
278
239
  }
279
240
 
280
- for (var i = 0, il = objKeys.length; i < il; ++i) {
241
+ for (var i = 0; i < objKeys.length; ++i) {
281
242
  var key = objKeys[i];
282
243
 
283
- if (skipNulls &&
284
- obj[key] === null) {
285
-
244
+ if (skipNulls && obj[key] === null) {
286
245
  continue;
287
246
  }
288
247
 
289
248
  if (Array.isArray(obj)) {
290
249
  values = values.concat(internals.stringify(obj[key], generateArrayPrefix(prefix, key), generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));
291
- }
292
- else {
250
+ } else {
293
251
  values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', generateArrayPrefix, strictNullHandling, skipNulls, encode, filter));
294
252
  }
295
253
  }
@@ -297,10 +255,9 @@ internals.stringify = function (obj, prefix, generateArrayPrefix, strictNullHand
297
255
  return values;
298
256
  };
299
257
 
300
-
301
- module.exports = function (obj, options) {
302
-
303
- options = options || {};
258
+ module.exports = function (object, opts) {
259
+ var obj = object;
260
+ var options = opts || {};
304
261
  var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
305
262
  var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : internals.strictNullHandling;
306
263
  var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : internals.skipNulls;
@@ -311,27 +268,22 @@ module.exports = function (obj, options) {
311
268
  if (typeof options.filter === 'function') {
312
269
  filter = options.filter;
313
270
  obj = filter('', obj);
314
- }
315
- else if (Array.isArray(options.filter)) {
271
+ } else if (Array.isArray(options.filter)) {
316
272
  objKeys = filter = options.filter;
317
273
  }
318
274
 
319
275
  var keys = [];
320
276
 
321
- if (typeof obj !== 'object' ||
322
- obj === null) {
323
-
277
+ if (typeof obj !== 'object' || obj === null) {
324
278
  return '';
325
279
  }
326
280
 
327
281
  var arrayFormat;
328
282
  if (options.arrayFormat in internals.arrayPrefixGenerators) {
329
283
  arrayFormat = options.arrayFormat;
330
- }
331
- else if ('indices' in options) {
284
+ } else if ('indices' in options) {
332
285
  arrayFormat = options.indices ? 'indices' : 'repeat';
333
- }
334
- else {
286
+ } else {
335
287
  arrayFormat = 'indices';
336
288
  }
337
289
 
@@ -345,12 +297,10 @@ module.exports = function (obj, options) {
345
297
  objKeys.sort(sort);
346
298
  }
347
299
 
348
- for (var i = 0, il = objKeys.length; i < il; ++i) {
300
+ for (var i = 0; i < objKeys.length; ++i) {
349
301
  var key = objKeys[i];
350
302
 
351
- if (skipNulls &&
352
- obj[key] === null) {
353
-
303
+ if (skipNulls && obj[key] === null) {
354
304
  continue;
355
305
  }
356
306
 
@@ -361,24 +311,23 @@ module.exports = function (obj, options) {
361
311
  };
362
312
 
363
313
  },{"./utils":4}],4:[function(require,module,exports){
364
- // Load modules
365
-
314
+ 'use strict';
366
315
 
367
- // Declare internals
316
+ var hexTable = (function () {
317
+ var array = new Array(256);
318
+ for (var i = 0; i < 256; ++i) {
319
+ array[i] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
320
+ }
368
321
 
369
- var internals = {};
370
- internals.hexTable = new Array(256);
371
- for (var h = 0; h < 256; ++h) {
372
- internals.hexTable[h] = '%' + ((h < 16 ? '0' : '') + h.toString(16)).toUpperCase();
373
- }
322
+ return array;
323
+ }());
374
324
 
325
+ var has = Object.prototype.hasOwnProperty;
375
326
 
376
327
  exports.arrayToObject = function (source, options) {
377
-
378
328
  var obj = options.plainObjects ? Object.create(null) : {};
379
- for (var i = 0, il = source.length; i < il; ++i) {
329
+ for (var i = 0; i < source.length; ++i) {
380
330
  if (typeof source[i] !== 'undefined') {
381
-
382
331
  obj[i] = source[i];
383
332
  }
384
333
  }
@@ -386,9 +335,7 @@ exports.arrayToObject = function (source, options) {
386
335
  return obj;
387
336
  };
388
337
 
389
-
390
338
  exports.merge = function (target, source, options) {
391
-
392
339
  if (!source) {
393
340
  return target;
394
341
  }
@@ -396,47 +343,39 @@ exports.merge = function (target, source, options) {
396
343
  if (typeof source !== 'object') {
397
344
  if (Array.isArray(target)) {
398
345
  target.push(source);
399
- }
400
- else if (typeof target === 'object') {
401
- target[source] = true;
402
- }
403
- else {
404
- target = [target, source];
346
+ } else if (typeof target === 'object') {
347
+ if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
348
+ target[source] = true;
349
+ }
350
+ } else {
351
+ return [target, source];
405
352
  }
406
353
 
407
354
  return target;
408
355
  }
409
356
 
410
357
  if (typeof target !== 'object') {
411
- target = [target].concat(source);
412
- return target;
358
+ return [target].concat(source);
413
359
  }
414
360
 
415
- if (Array.isArray(target) &&
416
- !Array.isArray(source)) {
417
-
418
- target = exports.arrayToObject(target, options);
361
+ var mergeTarget = target;
362
+ if (Array.isArray(target) && !Array.isArray(source)) {
363
+ mergeTarget = exports.arrayToObject(target, options);
419
364
  }
420
365
 
421
- var keys = Object.keys(source);
422
- for (var k = 0, kl = keys.length; k < kl; ++k) {
423
- var key = keys[k];
366
+ return Object.keys(source).reduce(function (acc, key) {
424
367
  var value = source[key];
425
368
 
426
- if (!Object.prototype.hasOwnProperty.call(target, key)) {
427
- target[key] = value;
369
+ if (has.call(acc, key)) {
370
+ acc[key] = exports.merge(acc[key], value, options);
371
+ } else {
372
+ acc[key] = value;
428
373
  }
429
- else {
430
- target[key] = exports.merge(target[key], value, options);
431
- }
432
- }
433
-
434
- return target;
374
+ return acc;
375
+ }, mergeTarget);
435
376
  };
436
377
 
437
-
438
378
  exports.decode = function (str) {
439
-
440
379
  try {
441
380
  return decodeURIComponent(str.replace(/\+/g, ' '));
442
381
  } catch (e) {
@@ -445,65 +384,60 @@ exports.decode = function (str) {
445
384
  };
446
385
 
447
386
  exports.encode = function (str) {
448
-
449
387
  // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
450
388
  // It has been adapted here for stricter adherence to RFC 3986
451
389
  if (str.length === 0) {
452
390
  return str;
453
391
  }
454
392
 
455
- if (typeof str !== 'string') {
456
- str = '' + str;
457
- }
393
+ var string = typeof str === 'string' ? str : String(str);
458
394
 
459
395
  var out = '';
460
- for (var i = 0, il = str.length; i < il; ++i) {
461
- var c = str.charCodeAt(i);
396
+ for (var i = 0; i < string.length; ++i) {
397
+ var c = string.charCodeAt(i);
462
398
 
463
- if (c === 0x2D || // -
399
+ if (
400
+ c === 0x2D || // -
464
401
  c === 0x2E || // .
465
402
  c === 0x5F || // _
466
403
  c === 0x7E || // ~
467
404
  (c >= 0x30 && c <= 0x39) || // 0-9
468
405
  (c >= 0x41 && c <= 0x5A) || // a-z
469
- (c >= 0x61 && c <= 0x7A)) { // A-Z
470
-
471
- out += str[i];
406
+ (c >= 0x61 && c <= 0x7A) // A-Z
407
+ ) {
408
+ out += string.charAt(i);
472
409
  continue;
473
410
  }
474
411
 
475
412
  if (c < 0x80) {
476
- out += internals.hexTable[c];
413
+ out = out + hexTable[c];
477
414
  continue;
478
415
  }
479
416
 
480
417
  if (c < 0x800) {
481
- out += internals.hexTable[0xC0 | (c >> 6)] + internals.hexTable[0x80 | (c & 0x3F)];
418
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
482
419
  continue;
483
420
  }
484
421
 
485
422
  if (c < 0xD800 || c >= 0xE000) {
486
- out += internals.hexTable[0xE0 | (c >> 12)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];
423
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
487
424
  continue;
488
425
  }
489
426
 
490
- ++i;
491
- c = 0x10000 + (((c & 0x3FF) << 10) | (str.charCodeAt(i) & 0x3FF));
492
- out += internals.hexTable[0xF0 | (c >> 18)] + internals.hexTable[0x80 | ((c >> 12) & 0x3F)] + internals.hexTable[0x80 | ((c >> 6) & 0x3F)] + internals.hexTable[0x80 | (c & 0x3F)];
427
+ i += 1;
428
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
429
+ out += (hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
493
430
  }
494
431
 
495
432
  return out;
496
433
  };
497
434
 
498
- exports.compact = function (obj, refs) {
499
-
500
- if (typeof obj !== 'object' ||
501
- obj === null) {
502
-
435
+ exports.compact = function (obj, references) {
436
+ if (typeof obj !== 'object' || obj === null) {
503
437
  return obj;
504
438
  }
505
439
 
506
- refs = refs || [];
440
+ var refs = references || [];
507
441
  var lookup = refs.indexOf(obj);
508
442
  if (lookup !== -1) {
509
443
  return refs[lookup];
@@ -514,7 +448,7 @@ exports.compact = function (obj, refs) {
514
448
  if (Array.isArray(obj)) {
515
449
  var compacted = [];
516
450
 
517
- for (var i = 0, il = obj.length; i < il; ++i) {
451
+ for (var i = 0; i < obj.length; ++i) {
518
452
  if (typeof obj[i] !== 'undefined') {
519
453
  compacted.push(obj[i]);
520
454
  }
@@ -524,32 +458,24 @@ exports.compact = function (obj, refs) {
524
458
  }
525
459
 
526
460
  var keys = Object.keys(obj);
527
- for (i = 0, il = keys.length; i < il; ++i) {
528
- var key = keys[i];
461
+ for (var j = 0; j < keys.length; ++j) {
462
+ var key = keys[j];
529
463
  obj[key] = exports.compact(obj[key], refs);
530
464
  }
531
465
 
532
466
  return obj;
533
467
  };
534
468
 
535
-
536
469
  exports.isRegExp = function (obj) {
537
-
538
470
  return Object.prototype.toString.call(obj) === '[object RegExp]';
539
471
  };
540
472
 
541
-
542
473
  exports.isBuffer = function (obj) {
543
-
544
- if (obj === null ||
545
- typeof obj === 'undefined') {
546
-
474
+ if (obj === null || typeof obj === 'undefined') {
547
475
  return false;
548
476
  }
549
477
 
550
- return !!(obj.constructor &&
551
- obj.constructor.isBuffer &&
552
- obj.constructor.isBuffer(obj));
478
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
553
479
  };
554
480
 
555
481
  },{}]},{},[1])(1)
package/lib/index.js CHANGED
@@ -1,15 +1,9 @@
1
1
  'use strict';
2
2
 
3
- // Load modules
3
+ var Stringify = require('./stringify');
4
+ var Parse = require('./parse');
4
5
 
5
- const Stringify = require('./stringify');
6
- const Parse = require('./parse');
7
-
8
-
9
- // Declare internals
10
-
11
- const internals = {};
12
-
13
-
14
- exports.stringify = Stringify;
15
- exports.parse = Parse;
6
+ module.exports = {
7
+ stringify: Stringify,
8
+ parse: Parse
9
+ };