@xaendar/common 0.7.41 → 0.9.0

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.
@@ -24,6 +24,8 @@ export declare function indent(lines: string[]): string[];
24
24
  */
25
25
  export declare function isValidCustomElementName(tagName: string): boolean;
26
26
 
27
+ export declare function slice(value: string, start?: number, end?: number): string;
28
+
27
29
  /**
28
30
  * A generic LIFO (Last In, First Out) stack data structure.
29
31
  *
@@ -50,6 +50,11 @@ function indent(lines) {
50
50
  return typeof lines === "string" ? ` ${lines}` : lines.map((line) => ` ${line}`);
51
51
  }
52
52
  //#endregion
53
+ //#region ../packages/common/src/utils/string/string.utils.ts
54
+ function slice(value, start, end) {
55
+ return JSON.stringify(JSON.parse(value.slice(start, end)));
56
+ }
57
+ //#endregion
53
58
  //#region ../packages/common/src/costants/not-alllowed-tags.constants.ts
54
59
  /**
55
60
  * Tag names that are reserved by the HTML/SVG specifications and cannot be
@@ -116,4 +121,4 @@ function isReservedTagName(tagName) {
116
121
  return NOT_ALLOWED_TAGS.includes(tagName);
117
122
  }
118
123
  //#endregion
119
- export { Stack, indent, isValidCustomElementName };
124
+ export { Stack, indent, isValidCustomElementName, slice };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaendar/common",
3
- "version": "0.7.41",
3
+ "version": "0.9.0",
4
4
  "description": "A library containing common classes and utilities",
5
5
  "sideEffects": false,
6
6
  "type": "module",