trousse 2.16.1 → 2.16.3

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/is.js CHANGED
@@ -25,7 +25,7 @@ const isPlainObject = (value) => {
25
25
  };
26
26
  const whitespaceOnlyRegex = /^\p{White_Space}*$/u;
27
27
  const isNonEmptyString = (value) => {
28
- if (!isString(value) || value === "") return false;
28
+ if (!isString(value) || !value) return false;
29
29
  const code = value.charCodeAt(0);
30
30
  if (code > 32 && code < 127) return true;
31
31
  return !whitespaceOnlyRegex.test(value);
package/dist/urls.js CHANGED
@@ -378,7 +378,7 @@ const normalizeUrl = (url, options) => {
378
378
  parsed.search = pairs.join("&");
379
379
  }
380
380
  if (options.sortQueryParams && parsed.search.includes("&")) parsed.search = parsed.search.slice(1).split("&").filter(Boolean).sort(compareQueryPairs).join("&");
381
- if (options.stripEmptyQuery && parsed.search === "") parsed.search = "";
381
+ if (options.stripEmptyQuery && !parsed.search) parsed.search = "";
382
382
  let result = parsed.href;
383
383
  if (options.stripRootSlash && result === `${parsed.origin}/`) result = parsed.origin;
384
384
  if (options.stripScheme ?? options.stripProtocol) result = result.replace(schemePrefixRegex, "");
package/package.json CHANGED
@@ -40,11 +40,11 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/bun": "^1.4.2",
43
- "kvalita": "^1.26.4",
43
+ "kvalita": "^1.28.0",
44
44
  "tsdown": "0.23.1"
45
45
  },
46
46
  "dependencies": {
47
47
  "entities": "^8.1.0"
48
48
  },
49
- "version": "2.16.1"
49
+ "version": "2.16.3"
50
50
  }