@singi-labs/sifa-sdk 0.11.29 → 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 +9 -18
- 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 +9 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -536,7 +536,7 @@ declare function formatCompanyName(name: string): string;
|
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* Normalize the letter-case of a legal-form designator (GmbH, LLC, N.V., B.V.,
|
|
539
|
-
* S.A., ...) appearing as the
|
|
539
|
+
* S.A., ...) appearing as the trailing whole-word token of a company
|
|
540
540
|
* name. Only that one token is touched; the company name itself is never
|
|
541
541
|
* recased, since brand-wordmark casing is not deterministic (see
|
|
542
542
|
* sifa-workspace#235, deliberately distinct from this pass).
|
package/dist/index.d.ts
CHANGED
|
@@ -536,7 +536,7 @@ declare function formatCompanyName(name: string): string;
|
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* Normalize the letter-case of a legal-form designator (GmbH, LLC, N.V., B.V.,
|
|
539
|
-
* S.A., ...) appearing as the
|
|
539
|
+
* S.A., ...) appearing as the trailing whole-word token of a company
|
|
540
540
|
* name. Only that one token is touched; the company name itself is never
|
|
541
541
|
* recased, since brand-wordmark casing is not deterministic (see
|
|
542
542
|
* sifa-workspace#235, deliberately distinct from this pass).
|
package/dist/index.js
CHANGED
|
@@ -1563,7 +1563,6 @@ var CANONICAL_LEGAL_FORMS = {
|
|
|
1563
1563
|
sl: "SL",
|
|
1564
1564
|
pty: "Pty"
|
|
1565
1565
|
};
|
|
1566
|
-
var AMBIGUOUS_WHEN_LEADING = /* @__PURE__ */ new Set(["as"]);
|
|
1567
1566
|
function recase(token, canonical) {
|
|
1568
1567
|
let li = 0;
|
|
1569
1568
|
let out = "";
|
|
@@ -1577,13 +1576,12 @@ function recase(token, canonical) {
|
|
|
1577
1576
|
}
|
|
1578
1577
|
return out;
|
|
1579
1578
|
}
|
|
1580
|
-
function normalizeToken(token
|
|
1579
|
+
function normalizeToken(token) {
|
|
1581
1580
|
const letters = token.replace(/\./g, "");
|
|
1582
1581
|
if (!/^[A-Za-z]+$/.test(letters)) return token;
|
|
1583
1582
|
const key = letters.toLowerCase();
|
|
1584
1583
|
const canonical = CANONICAL_LEGAL_FORMS[key];
|
|
1585
1584
|
if (typeof canonical !== "string") return token;
|
|
1586
|
-
if (isLeading && AMBIGUOUS_WHEN_LEADING.has(key)) return token;
|
|
1587
1585
|
return recase(token, canonical);
|
|
1588
1586
|
}
|
|
1589
1587
|
function normalizeLegalForm(name) {
|
|
@@ -1595,21 +1593,14 @@ function normalizeLegalForm(name) {
|
|
|
1595
1593
|
if (part !== void 0 && part.length > 0 && !/^\s+$/.test(part)) wordIndices.push(i);
|
|
1596
1594
|
}
|
|
1597
1595
|
if (wordIndices.length === 0) return name;
|
|
1598
|
-
const firstIdx = wordIndices[0];
|
|
1599
1596
|
const lastIdx = wordIndices[wordIndices.length - 1];
|
|
1600
|
-
if (
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
if (rewritten !== original) {
|
|
1608
|
-
parts[idx] = rewritten;
|
|
1609
|
-
changed = true;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
return changed ? parts.join("") : name;
|
|
1597
|
+
if (lastIdx === void 0) return name;
|
|
1598
|
+
const original = parts[lastIdx];
|
|
1599
|
+
if (original === void 0) return name;
|
|
1600
|
+
const rewritten = normalizeToken(original);
|
|
1601
|
+
if (rewritten === original) return name;
|
|
1602
|
+
parts[lastIdx] = rewritten;
|
|
1603
|
+
return parts.join("");
|
|
1613
1604
|
}
|
|
1614
1605
|
|
|
1615
1606
|
// src/format/normalize-company-key.ts
|
|
@@ -3116,7 +3107,7 @@ var ProfileVolunteeringRecordSchema = z.object({
|
|
|
3116
3107
|
});
|
|
3117
3108
|
|
|
3118
3109
|
// src/index.ts
|
|
3119
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
3110
|
+
var SIFA_SDK_VERSION = "0.11.30";
|
|
3120
3111
|
|
|
3121
3112
|
export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVOLVEMENT_NSID, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, findIndustry, formatCompanyName, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isLinked, isPseudoEmployer, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, profileToDimensionInputs, relativeLuminance, resolveCardHealth, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, sortByDateDesc, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, truncateGraphemes, uriSchema };
|
|
3122
3113
|
//# sourceMappingURL=index.js.map
|