gtm-now 0.5.2 → 0.5.4
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.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8753,8 +8753,9 @@ function parseName(fullName) {
|
|
|
8753
8753
|
return { first: parts[0], last: parts.slice(1).join(" ") };
|
|
8754
8754
|
}
|
|
8755
8755
|
function domainToCompanyName(domain) {
|
|
8756
|
-
const
|
|
8757
|
-
|
|
8756
|
+
const slug = domain.split(".")[0] ?? domain;
|
|
8757
|
+
const words = slug.replace(/[-_]/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(/\s+/).filter(Boolean);
|
|
8758
|
+
return words.map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join(" ");
|
|
8758
8759
|
}
|
|
8759
8760
|
var SENIORITY_TO_DISCO, DiscoAdapter;
|
|
8760
8761
|
var init_disco = __esm({
|
|
@@ -8903,11 +8904,11 @@ var init_disco = __esm({
|
|
|
8903
8904
|
first_name: nameParts.first,
|
|
8904
8905
|
last_name: nameParts.last,
|
|
8905
8906
|
job_title: c.title,
|
|
8906
|
-
company: domainToCompanyName(c.domain),
|
|
8907
|
+
company: c.company_name ?? domainToCompanyName(c.domain),
|
|
8907
8908
|
company_domain: c.domain,
|
|
8908
8909
|
linkedin_url: c.social_urls?.find((u) => u.includes("linkedin")),
|
|
8909
8910
|
email: c.email,
|
|
8910
|
-
phone: c.phone,
|
|
8911
|
+
phone: typeof c.phone === "string" ? c.phone : Array.isArray(c.phone) ? c.phone[0]?.phone : void 0,
|
|
8911
8912
|
seniority: c.seniority,
|
|
8912
8913
|
department: c.department,
|
|
8913
8914
|
skills: c.skills,
|