@sv443-network/userutils 9.4.2 → 9.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @sv443-network/userutils
2
2
 
3
+ ## 9.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 528e09c: Fix `can't convert trArgs[0] to string` error
8
+
3
9
  ## 9.4.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1975,7 +1975,13 @@ var templateLiteralTransform = [
1975
1975
  str = str.replace(match[0], String(trArgs[matchNum]));
1976
1976
  }
1977
1977
  };
1978
- const isArgsObject = trArgs[0] && typeof trArgs[0] === "object" && trArgs[0] !== null && String(trArgs[0]).startsWith("[object");
1978
+ let notStringifiable = false;
1979
+ try {
1980
+ String(trArgs[0]);
1981
+ } catch (e) {
1982
+ notStringifiable = true;
1983
+ }
1984
+ const isArgsObject = trArgs[0] && typeof trArgs[0] === "object" && trArgs[0] !== null && (notStringifiable || String(trArgs[0]).startsWith("[object"));
1979
1985
  if (isArgsObject && eachKeyInTrString(Object.keys(trArgs[0])))
1980
1986
  namedMapping();
1981
1987
  else
@@ -8,7 +8,7 @@
8
8
  // ==UserLibrary==
9
9
  // @name UserUtils
10
10
  // @description General purpose DOM/GreaseMonkey library that allows you to register listeners for when CSS selectors exist, intercept events, create persistent & synchronous data stores, modify the DOM more easily and much more
11
- // @version 9.4.2
11
+ // @version 9.4.3
12
12
  // @license MIT
13
13
  // @copyright Sv443 (https://github.com/Sv443)
14
14
 
@@ -2013,7 +2013,13 @@ Has: ${checksum}`);
2013
2013
  str = str.replace(match[0], String(trArgs[matchNum]));
2014
2014
  }
2015
2015
  };
2016
- const isArgsObject = trArgs[0] && typeof trArgs[0] === "object" && trArgs[0] !== null && String(trArgs[0]).startsWith("[object");
2016
+ let notStringifiable = false;
2017
+ try {
2018
+ String(trArgs[0]);
2019
+ } catch (e) {
2020
+ notStringifiable = true;
2021
+ }
2022
+ const isArgsObject = trArgs[0] && typeof trArgs[0] === "object" && trArgs[0] !== null && (notStringifiable || String(trArgs[0]).startsWith("[object"));
2017
2023
  if (isArgsObject && eachKeyInTrString(Object.keys(trArgs[0])))
2018
2024
  namedMapping();
2019
2025
  else
package/dist/index.js CHANGED
@@ -1973,7 +1973,13 @@ var templateLiteralTransform = [
1973
1973
  str = str.replace(match[0], String(trArgs[matchNum]));
1974
1974
  }
1975
1975
  };
1976
- const isArgsObject = trArgs[0] && typeof trArgs[0] === "object" && trArgs[0] !== null && String(trArgs[0]).startsWith("[object");
1976
+ let notStringifiable = false;
1977
+ try {
1978
+ String(trArgs[0]);
1979
+ } catch (e) {
1980
+ notStringifiable = true;
1981
+ }
1982
+ const isArgsObject = trArgs[0] && typeof trArgs[0] === "object" && trArgs[0] !== null && (notStringifiable || String(trArgs[0]).startsWith("[object"));
1977
1983
  if (isArgsObject && eachKeyInTrString(Object.keys(trArgs[0])))
1978
1984
  namedMapping();
1979
1985
  else
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sv443-network/userutils",
3
3
  "libName": "UserUtils",
4
- "version": "9.4.2",
4
+ "version": "9.4.3",
5
5
  "description": "General purpose DOM/GreaseMonkey library that allows you to register listeners for when CSS selectors exist, intercept events, create persistent & synchronous data stores, modify the DOM more easily and much more",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",