@singi-labs/sifa-sdk 0.11.17 → 0.11.18
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 +52 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +52 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1430,6 +1430,56 @@ function getCalendarEventStatusLabel(value) {
|
|
|
1430
1430
|
return CALENDAR_EVENT_STATUS_LABELS[value] ?? value;
|
|
1431
1431
|
}
|
|
1432
1432
|
|
|
1433
|
+
// src/format/company-name.ts
|
|
1434
|
+
var SMALL_WORDS = /* @__PURE__ */ new Set([
|
|
1435
|
+
"a",
|
|
1436
|
+
"an",
|
|
1437
|
+
"and",
|
|
1438
|
+
"the",
|
|
1439
|
+
"of",
|
|
1440
|
+
"for",
|
|
1441
|
+
"to",
|
|
1442
|
+
"in",
|
|
1443
|
+
"on",
|
|
1444
|
+
"at",
|
|
1445
|
+
"by",
|
|
1446
|
+
"or",
|
|
1447
|
+
"nor",
|
|
1448
|
+
"but",
|
|
1449
|
+
"as",
|
|
1450
|
+
"vs",
|
|
1451
|
+
"via",
|
|
1452
|
+
"with",
|
|
1453
|
+
"de",
|
|
1454
|
+
"del",
|
|
1455
|
+
"van",
|
|
1456
|
+
"von",
|
|
1457
|
+
"der",
|
|
1458
|
+
"den",
|
|
1459
|
+
"het",
|
|
1460
|
+
"la",
|
|
1461
|
+
"le",
|
|
1462
|
+
"y"
|
|
1463
|
+
]);
|
|
1464
|
+
function capitalizeWord(word) {
|
|
1465
|
+
return word.replace(
|
|
1466
|
+
/^([^\p{L}\p{N}]*)(\p{L})/u,
|
|
1467
|
+
(_m, lead, ch) => lead + ch.toUpperCase()
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
function formatCompanyName(name) {
|
|
1471
|
+
const trimmed = name.trim();
|
|
1472
|
+
if (!trimmed || trimmed !== trimmed.toLowerCase()) return trimmed;
|
|
1473
|
+
let seenWord = false;
|
|
1474
|
+
return trimmed.split(/(\s+)/).map((token) => {
|
|
1475
|
+
if (token.length === 0 || /^\s+$/.test(token)) return token;
|
|
1476
|
+
const isFirst = !seenWord;
|
|
1477
|
+
seenWord = true;
|
|
1478
|
+
if (!isFirst && SMALL_WORDS.has(token)) return token;
|
|
1479
|
+
return capitalizeWord(token);
|
|
1480
|
+
}).join("");
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1433
1483
|
// src/format/format-time.ts
|
|
1434
1484
|
function formatRelativeTime(dateString) {
|
|
1435
1485
|
const date = new Date(dateString);
|
|
@@ -2801,7 +2851,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
2801
2851
|
});
|
|
2802
2852
|
|
|
2803
2853
|
// src/index.ts
|
|
2804
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
2854
|
+
var SIFA_SDK_VERSION = "0.11.18";
|
|
2805
2855
|
|
|
2806
2856
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
2807
2857
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -2896,6 +2946,7 @@ exports.entityDisambiguationLabel = entityDisambiguationLabel;
|
|
|
2896
2946
|
exports.entityResultKey = entityResultKey;
|
|
2897
2947
|
exports.externalRecordRefSchema = externalRecordRefSchema;
|
|
2898
2948
|
exports.findIndustry = findIndustry;
|
|
2949
|
+
exports.formatCompanyName = formatCompanyName;
|
|
2899
2950
|
exports.formatDistanceToNow = formatDistanceToNow;
|
|
2900
2951
|
exports.formatLocation = formatLocation;
|
|
2901
2952
|
exports.formatPresentationDuration = formatPresentationDuration;
|