@fuman/fetch 0.3.0 → 0.4.0

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/addons/_utils.cjs CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  function urlencode(query) {
4
4
  const search = new URLSearchParams();
5
5
  for (const [key, value] of Object.entries(query)) {
6
+ if (value == null) continue;
6
7
  if (Array.isArray(value)) {
7
8
  for (let i = 0; i < value.length; i++) {
8
9
  search.append(key, String(value[i]));
package/addons/_utils.js CHANGED
@@ -1,6 +1,7 @@
1
1
  function urlencode(query) {
2
2
  const search = new URLSearchParams();
3
3
  for (const [key, value] of Object.entries(query)) {
4
+ if (value == null) continue;
4
5
  if (Array.isArray(value)) {
5
6
  for (let i = 0; i < value.length; i++) {
6
7
  search.append(key, String(value[i]));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fuman/fetch",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "tiny wrapper over fetch",
6
6
  "license": "MIT",
7
7
  "dependencies": {