@singi-labs/sifa-sdk 0.14.5 → 0.14.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.cjs CHANGED
@@ -2789,6 +2789,15 @@ function pickPrimaryPosition(positions) {
2789
2789
  return [...active].sort((a, b) => (b.startedAt ?? "").localeCompare(a.startedAt ?? ""))[0];
2790
2790
  }
2791
2791
 
2792
+ // src/profile/headline-role-dedupe.ts
2793
+ function normalize(value) {
2794
+ return value.trim().replace(/\s+/g, " ").replace(/[.,;:·|]+$/, "").trim().toLowerCase();
2795
+ }
2796
+ function isRoleLineRedundant(headline, roleLine) {
2797
+ if (!headline || !roleLine) return false;
2798
+ return normalize(headline) === normalize(roleLine);
2799
+ }
2800
+
2792
2801
  // src/profile/section-model.ts
2793
2802
  var SECTION_GROUPS = [
2794
2803
  { id: "overview", labelKey: "groupOverview" },
@@ -2915,7 +2924,10 @@ function buildMetaDescription(profile) {
2915
2924
  if (currentPosition.title) positionParts.push(currentPosition.title);
2916
2925
  const company = currentPosition.entityName ?? currentPosition.company;
2917
2926
  if (company) positionParts.push(`at ${company}`);
2918
- if (positionParts.length > 0) parts.push(positionParts.join(" "));
2927
+ if (positionParts.length > 0) {
2928
+ const roleLine = positionParts.join(" ");
2929
+ if (!isRoleLineRedundant(profile.headline, roleLine)) parts.push(roleLine);
2930
+ }
2919
2931
  }
2920
2932
  if (profile.location) {
2921
2933
  parts.push(formatLocation(profile.location));
@@ -5933,7 +5945,7 @@ function describeSifaRecord(collection, value) {
5933
5945
  }
5934
5946
 
5935
5947
  // src/index.ts
5936
- var SIFA_SDK_VERSION = "0.14.5";
5948
+ var SIFA_SDK_VERSION = "0.14.7";
5937
5949
 
5938
5950
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
5939
5951
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6132,6 +6144,7 @@ exports.isLinked = isLinked;
6132
6144
  exports.isOnBehalfOfApplicable = isOnBehalfOfApplicable;
6133
6145
  exports.isPseudoEmployer = isPseudoEmployer;
6134
6146
  exports.isRegistrableDomainHandle = isRegistrableDomainHandle;
6147
+ exports.isRoleLineRedundant = isRoleLineRedundant;
6135
6148
  exports.isSectionPopulated = isSectionPopulated;
6136
6149
  exports.isValidRgbColor = isValidRgbColor;
6137
6150
  exports.isVisibleActivityItem = isVisibleActivityItem;