@stll/anonymize 1.4.10 → 1.4.11
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.mjs +12 -1
- package/dist/index.mjs.map +1 -1
- package/dist/names-nw-ar.mjs +202 -0
- package/dist/names-nw-ar.mjs.map +1 -0
- package/dist/names-nw-fil.mjs +202 -0
- package/dist/names-nw-fil.mjs.map +1 -0
- package/dist/names-nw-id.mjs +210 -0
- package/dist/names-nw-id.mjs.map +1 -0
- package/dist/names-nw-in.mjs +526 -0
- package/dist/names-nw-in.mjs.map +1 -0
- package/dist/names-nw-ja-latn.mjs +260 -0
- package/dist/names-nw-ja-latn.mjs.map +1 -0
- package/dist/names-nw-ko.mjs +162 -0
- package/dist/names-nw-ko.mjs.map +1 -0
- package/dist/names-nw-th.mjs +188 -0
- package/dist/names-nw-th.mjs.map +1 -0
- package/dist/names-nw-vi.mjs +151 -0
- package/dist/names-nw-vi.mjs.map +1 -0
- package/dist/names-nw-zh-latn.mjs +197 -0
- package/dist/names-nw-zh-latn.mjs.map +1 -0
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -8304,6 +8304,17 @@ const NONWESTERN_LOCALE_KEYS = [
|
|
|
8304
8304
|
"fil",
|
|
8305
8305
|
"id"
|
|
8306
8306
|
];
|
|
8307
|
+
const NONWESTERN_NAME_IMPORTS = {
|
|
8308
|
+
in: () => import("./names-nw-in.mjs"),
|
|
8309
|
+
ar: () => import("./names-nw-ar.mjs"),
|
|
8310
|
+
"ja-latn": () => import("./names-nw-ja-latn.mjs"),
|
|
8311
|
+
ko: () => import("./names-nw-ko.mjs"),
|
|
8312
|
+
"zh-latn": () => import("./names-nw-zh-latn.mjs"),
|
|
8313
|
+
th: () => import("./names-nw-th.mjs"),
|
|
8314
|
+
vi: () => import("./names-nw-vi.mjs"),
|
|
8315
|
+
fil: () => import("./names-nw-fil.mjs"),
|
|
8316
|
+
id: () => import("./names-nw-id.mjs")
|
|
8317
|
+
};
|
|
8307
8318
|
const normalizeCorpusLanguage = (language) => language.toLowerCase();
|
|
8308
8319
|
const getScopedNonWesternLocaleKeys = (languages) => {
|
|
8309
8320
|
if (languages === void 0) return NONWESTERN_LOCALE_KEYS;
|
|
@@ -8376,7 +8387,7 @@ const initNameCorpus = (ctx = defaultContext, dictionaries, languages) => {
|
|
|
8376
8387
|
for (const form of scopedNonWesternHonorifics) if (form.endsWith(".")) titleAbbrSet.add(form.replace(/[.-]+$/u, "").toLowerCase());
|
|
8377
8388
|
const exclusions = exclusionMod.default.words;
|
|
8378
8389
|
const nwLocaleKeys = getScopedNonWesternLocaleKeys(languages);
|
|
8379
|
-
const [nwNameMods, nwExcludedMod] = await Promise.all([Promise.all(nwLocaleKeys.map((locale) =>
|
|
8390
|
+
const [nwNameMods, nwExcludedMod] = await Promise.all([Promise.all(nwLocaleKeys.map((locale) => NONWESTERN_NAME_IMPORTS[locale]())), import("./names-nw-excluded-allcaps.mjs")]);
|
|
8380
8391
|
const nonWesternNames = [];
|
|
8381
8392
|
for (const mod of nwNameMods) for (const name of mod.default.names) nonWesternNames.push(name);
|
|
8382
8393
|
if (dictionaries?.nonWesternNames) {
|