@kopexa/shared-utils 1.1.5 → 1.1.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.js +3 -0
- package/dist/index.mjs +3 -0
- package/dist/text.js +3 -0
- package/dist/text.mjs +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -148,6 +148,9 @@ var getInitials = (text) => {
|
|
|
148
148
|
return safeText(text);
|
|
149
149
|
}
|
|
150
150
|
const initials = words.map((word) => word.charAt(0).toUpperCase());
|
|
151
|
+
if (initials.length > 2) {
|
|
152
|
+
initials.length = 2;
|
|
153
|
+
}
|
|
151
154
|
return initials.join("");
|
|
152
155
|
};
|
|
153
156
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
package/dist/text.js
CHANGED
|
@@ -35,6 +35,9 @@ var getInitials = (text) => {
|
|
|
35
35
|
return safeText(text);
|
|
36
36
|
}
|
|
37
37
|
const initials = words.map((word) => word.charAt(0).toUpperCase());
|
|
38
|
+
if (initials.length > 2) {
|
|
39
|
+
initials.length = 2;
|
|
40
|
+
}
|
|
38
41
|
return initials.join("");
|
|
39
42
|
};
|
|
40
43
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/text.mjs
CHANGED