@noego/trust 0.5.0-dev.5 → 0.5.0-dev.6

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.
@@ -6250,11 +6250,16 @@ var DEFAULT_RULE_SETTINGS = Object.freeze({
6250
6250
  "untrusted-value": "off",
6251
6251
  "dropped-result": "off",
6252
6252
  "redundant-guard": "off",
6253
+ "result-lookalike": "strict",
6253
6254
  untrustedCallbacks: "inline"
6254
6255
  });
6255
6256
  function isRuleEnabled(config, rule) {
6256
6257
  return config.rules[rule] === "on";
6257
6258
  }
6259
+ function reportsResultLookalikes(config, strict) {
6260
+ const setting = config.rules["result-lookalike"];
6261
+ return setting === "on" || setting === "strict" && strict;
6262
+ }
6258
6263
  var BOUNDARY_EXCLUDE = /^(?:[^\s.#:*]+)?(?:\.(?:[^\s.#:*]+|\*))?$/;
6259
6264
  var TrustConfigError = class extends Error {
6260
6265
  name = "TrustConfigError";
@@ -6270,6 +6275,7 @@ var RULE_VALUES = {
6270
6275
  "untrusted-value": ["on", "off"],
6271
6276
  "dropped-result": ["on", "off"],
6272
6277
  "redundant-guard": ["on", "off"],
6278
+ "result-lookalike": ["off", "strict", "on"],
6273
6279
  untrustedCallbacks: ["off", "inline", "all"]
6274
6280
  };
6275
6281
  function normalizeOrigin(origin) {
@@ -7040,6 +7046,7 @@ export {
7040
7046
  PRESETS,
7041
7047
  DEFAULT_RULE_SETTINGS,
7042
7048
  isRuleEnabled,
7049
+ reportsResultLookalikes,
7043
7050
  TrustConfigError,
7044
7051
  normalizeOrigin,
7045
7052
  loadTrustConfig,
@@ -7072,4 +7079,4 @@ export {
7072
7079
  readBaseline,
7073
7080
  describeBaselineDelta
7074
7081
  };
7075
- //# sourceMappingURL=chunk-GJUWPZZJ.js.map
7082
+ //# sourceMappingURL=chunk-RVTPDLEW.js.map