@singi-labs/sifa-sdk 0.12.76 → 0.12.77

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
@@ -879,6 +879,12 @@ var CATEGORY_LABELS = {
879
879
  ...Object.fromEntries(SKILL_CATEGORIES.map((c) => [c.value, c.label])),
880
880
  other: "Other"
881
881
  };
882
+ function normalizeSkillCategory(value) {
883
+ if (typeof value !== "string") return void 0;
884
+ const afterRef = value.includes("#") ? value.slice(value.lastIndexOf("#") + 1) : value;
885
+ const token = afterRef.trim().toLowerCase();
886
+ return token === "" ? void 0 : token;
887
+ }
882
888
 
883
889
  // src/taxonomy/skill-grouping.ts
884
890
  function dedupeSkills(skills) {
@@ -914,7 +920,7 @@ function dedupeSkills(skills) {
914
920
  function groupSkillsByCategory(skills) {
915
921
  const grouped = /* @__PURE__ */ new Map();
916
922
  for (const skill of skills) {
917
- const normalised = skill.category?.toLowerCase().trim() ?? "";
923
+ const normalised = normalizeSkillCategory(skill.category) ?? "";
918
924
  const key = CATEGORY_ORDER.includes(normalised) ? normalised : "other";
919
925
  const bucket = grouped.get(key) ?? [];
920
926
  bucket.push(skill);
@@ -5816,7 +5822,7 @@ function describeSifaRecord(collection, value) {
5816
5822
  }
5817
5823
 
5818
5824
  // src/index.ts
5819
- var SIFA_SDK_VERSION = "0.12.76";
5825
+ var SIFA_SDK_VERSION = "0.12.77";
5820
5826
 
5821
5827
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
5822
5828
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6027,6 +6033,7 @@ exports.normalizeOpenTo = normalizeOpenTo;
6027
6033
  exports.normalizePlatformId = normalizePlatformId;
6028
6034
  exports.normalizePresentationMode = normalizePresentationMode;
6029
6035
  exports.normalizePresentationRole = normalizePresentationRole;
6036
+ exports.normalizeSkillCategory = normalizeSkillCategory;
6030
6037
  exports.normalizeWorkplaceTypes = normalizeWorkplaceTypes;
6031
6038
  exports.openToTokenToValue = openToTokenToValue;
6032
6039
  exports.openToValueToToken = openToValueToToken;