chore: update to version 14.0.11 and align website URLs

This commit is contained in:
Kurdistan Tech Ministry committed 2026-01-11 11:34:13 +03:00
1 parent ef74383349
commit 19c8d69bd8
1499 files changed
+53633 -89

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
/**
* @name stringShorten
* @summary Returns a string with maximum length
* @description
* Checks the string against the `prefixLength`, if longer than double this, shortens it by placing `..` in the middle of it
* @example
* <BR>
*
* ```javascript
* import { stringShorten } from '@pezkuwi/util';
*
* stringShorten('1234567890', 2); // => 12..90
* ```
*/
export function stringShorten(value, prefixLength = 6) {
return value.length <= 2 + 2 * prefixLength
? value.toString()
: `${value.substring(0, prefixLength)}…${value.slice(-prefixLength)}`;
}