@stll/anonymize 0.0.5 → 0.0.7

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/index.js CHANGED
@@ -1,10 +1,7 @@
1
- import { createRequire } from "node:module";
2
1
  import { at, be, bg, cy, cz, de, dk, ee, es, fi, fr, gb, gr, hr, hu, ie, it, lt, lu, lv, mt, nl, pl, pt, ro, se, si, sk } from "@stll/stdnum";
3
2
  import { toRegex } from "@stll/stdnum/patterns";
3
+ import charGroupsJson from "@stll/anonymize-data/config/char-groups.json";
4
4
  import { TextSearch } from "@stll/text-search";
5
- //#region \0rolldown/runtime.js
6
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
7
- //#endregion
8
5
  //#region src/types.ts
9
6
  /**
10
7
  * Source of a detected entity span.
@@ -1002,12 +999,7 @@ const POST_NOMINALS = [
1002
999
  /** Chars that need escaping inside a regex char class. */
1003
1000
  const REGEX_CLASS_SPECIAL = /[\\\]^-]/;
1004
1001
  const escapeForCharClass = (ch) => REGEX_CLASS_SPECIAL.test(ch) ? `\\${ch}` : ch;
1005
- let cached;
1006
- const loadConfig = () => {
1007
- if (cached) return cached;
1008
- cached = __require("@stll/anonymize-data/config/char-groups.json");
1009
- return cached;
1010
- };
1002
+ const loadConfig = () => charGroupsJson;
1011
1003
  /**
1012
1004
  * Get the raw characters for a named group.
1013
1005
  * Throws if the group does not exist.