jquery-param 1.1.6 → 1.1.9

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.
@@ -25,7 +25,7 @@ var param = function (a) {
25
25
  obj[i]
26
26
  );
27
27
  }
28
- } else if (String(obj) === '[object Object]') {
28
+ } else if (Object.prototype.toString.call(obj) === '[object Object]') {
29
29
  for (key in obj) {
30
30
  buildParams(prefix + '[' + key + ']', obj[key]);
31
31
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
2
  jquery-param (c) KNOWLEDGECODE | MIT
3
3
  */
4
- export default function(h){function d(c,a){var e;if(c)if(Array.isArray(a)){var b=0;for(e=a.length;b<e;b++)d(c+"["+("object"===typeof a[b]&&a[b]?b:"")+"]",a[b])}else if("[object Object]"===String(a))for(b in a)d(c+"["+b+"]",a[b]);else g(c,a);else if(Array.isArray(a))for(b=0,e=a.length;b<e;b++)g(a[b].name,a[b].value);else for(b in a)d(b,a[b]);return f}function g(c,a){a="function"===typeof a?a():a;a=null===a?"":void 0===a?"":a;f[f.length]=encodeURIComponent(c)+"="+encodeURIComponent(a)}var f=
5
- [];return d("",h).join("&")}
4
+ export default function(h){function d(c,a){var e;if(c)if(Array.isArray(a)){var b=0;for(e=a.length;b<e;b++)d(c+"["+("object"===typeof a[b]&&a[b]?b:"")+"]",a[b])}else if("[object Object]"===Object.prototype.toString.call(a))for(b in a)d(c+"["+b+"]",a[b]);else g(c,a);else if(Array.isArray(a))for(b=0,e=a.length;b<e;b++)g(a[b].name,a[b].value);else for(b in a)d(b,a[b]);return f}function g(c,a){a="function"===typeof a?a():a;a=null===a?"":void 0===a?"":a;f[f.length]=encodeURIComponent(c)+"="+
5
+ encodeURIComponent(a)}var f=[];return d("",h).join("&")}
package/jquery-param.js CHANGED
@@ -31,7 +31,7 @@
31
31
  obj[i]
32
32
  );
33
33
  }
34
- } else if (String(obj) === '[object Object]') {
34
+ } else if (Object.prototype.toString.call(obj) === '[object Object]') {
35
35
  for (key in obj) {
36
36
  buildParams(prefix + '[' + key + ']', obj[key]);
37
37
  }
@@ -2,4 +2,4 @@
2
2
  jquery-param (c) KNOWLEDGECODE | MIT
3
3
  */
4
4
  'use strict';(function(c,d){"object"===typeof exports&&"undefined"!==typeof module?module.exports=d():"function"===typeof define&&define.amd?define(d):(c="undefined"!==typeof globalThis?globalThis:c||self,c.param=d())})(this,function(){return function(c){var d=[],g=function(e,a){a="function"===typeof a?a():a;a=null===a?"":void 0===a?"":a;d[d.length]=encodeURIComponent(e)+"="+encodeURIComponent(a)},f=function(e,a){var c;if(e)if(Array.isArray(a)){var b=0;for(c=a.length;b<c;b++)f(e+"["+("object"===typeof a[b]&&
5
- a[b]?b:"")+"]",a[b])}else if("[object Object]"===String(a))for(b in a)f(e+"["+b+"]",a[b]);else g(e,a);else if(Array.isArray(a))for(b=0,c=a.length;b<c;b++)g(a[b].name,a[b].value);else for(b in a)f(b,a[b]);return d};return f("",c).join("&")}})
5
+ a[b]?b:"")+"]",a[b])}else if("[object Object]"===Object.prototype.toString.call(a))for(b in a)f(e+"["+b+"]",a[b]);else g(e,a);else if(Array.isArray(a))for(b=0,c=a.length;b<c;b++)g(a[b].name,a[b].value);else for(b in a)f(b,a[b]);return d};return f("",c).join("&")}})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jquery-param",
3
- "version": "1.1.6",
3
+ "version": "1.1.9",
4
4
  "description": "equivalent function to jQuery.param",
5
5
  "main": "jquery-param.js",
6
6
  "module": "esm/jquery-param.es.js",
@@ -30,10 +30,10 @@
30
30
  "@ampproject/rollup-plugin-closure-compiler": "^0.26.0",
31
31
  "expect.js": "^0.3.1",
32
32
  "jquery": "^3.6.0",
33
- "jsdom": "^16.5.3",
33
+ "jsdom": "^19.0.0",
34
34
  "mocha": "^7.2.0",
35
35
  "mocha-phantomjs-core": "^2.1.2",
36
36
  "phantomjs-prebuilt": "^2.1.16",
37
- "rollup": "^2.45.1"
37
+ "rollup": "^2.50.6"
38
38
  }
39
39
  }