@singi-labs/sifa-sdk 0.11.28 → 0.11.30
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.cjs +10 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1565,7 +1565,6 @@ var CANONICAL_LEGAL_FORMS = {
|
|
|
1565
1565
|
sl: "SL",
|
|
1566
1566
|
pty: "Pty"
|
|
1567
1567
|
};
|
|
1568
|
-
var AMBIGUOUS_WHEN_LEADING = /* @__PURE__ */ new Set(["as"]);
|
|
1569
1568
|
function recase(token, canonical) {
|
|
1570
1569
|
let li = 0;
|
|
1571
1570
|
let out = "";
|
|
@@ -1579,13 +1578,12 @@ function recase(token, canonical) {
|
|
|
1579
1578
|
}
|
|
1580
1579
|
return out;
|
|
1581
1580
|
}
|
|
1582
|
-
function normalizeToken(token
|
|
1581
|
+
function normalizeToken(token) {
|
|
1583
1582
|
const letters = token.replace(/\./g, "");
|
|
1584
1583
|
if (!/^[A-Za-z]+$/.test(letters)) return token;
|
|
1585
1584
|
const key = letters.toLowerCase();
|
|
1586
1585
|
const canonical = CANONICAL_LEGAL_FORMS[key];
|
|
1587
|
-
if (
|
|
1588
|
-
if (isLeading && AMBIGUOUS_WHEN_LEADING.has(key)) return token;
|
|
1586
|
+
if (typeof canonical !== "string") return token;
|
|
1589
1587
|
return recase(token, canonical);
|
|
1590
1588
|
}
|
|
1591
1589
|
function normalizeLegalForm(name) {
|
|
@@ -1597,21 +1595,14 @@ function normalizeLegalForm(name) {
|
|
|
1597
1595
|
if (part !== void 0 && part.length > 0 && !/^\s+$/.test(part)) wordIndices.push(i);
|
|
1598
1596
|
}
|
|
1599
1597
|
if (wordIndices.length === 0) return name;
|
|
1600
|
-
const firstIdx = wordIndices[0];
|
|
1601
1598
|
const lastIdx = wordIndices[wordIndices.length - 1];
|
|
1602
|
-
if (
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
if (rewritten !== original) {
|
|
1610
|
-
parts[idx] = rewritten;
|
|
1611
|
-
changed = true;
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
return changed ? parts.join("") : name;
|
|
1599
|
+
if (lastIdx === void 0) return name;
|
|
1600
|
+
const original = parts[lastIdx];
|
|
1601
|
+
if (original === void 0) return name;
|
|
1602
|
+
const rewritten = normalizeToken(original);
|
|
1603
|
+
if (rewritten === original) return name;
|
|
1604
|
+
parts[lastIdx] = rewritten;
|
|
1605
|
+
return parts.join("");
|
|
1615
1606
|
}
|
|
1616
1607
|
|
|
1617
1608
|
// src/format/normalize-company-key.ts
|
|
@@ -3118,7 +3109,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
3118
3109
|
});
|
|
3119
3110
|
|
|
3120
3111
|
// src/index.ts
|
|
3121
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
3112
|
+
var SIFA_SDK_VERSION = "0.11.30";
|
|
3122
3113
|
|
|
3123
3114
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
3124
3115
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|