@xaendar/common 0.6.4 → 0.6.5
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Indents each line of a code block by two spaces.
|
|
3
3
|
* @param lines The lines of code to indent.
|
|
4
|
-
* @return
|
|
4
|
+
* @return The indented line or an array of indented lines.
|
|
5
5
|
*/
|
|
6
|
-
export declare function indent(
|
|
6
|
+
export declare function indent(lines: string): string;
|
|
7
|
+
|
|
8
|
+
export declare function indent(lines: string[]): string[];
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Asserts that a given tag name is valid for use as a custom element name.
|
|
@@ -46,13 +46,8 @@ var Stack = class {
|
|
|
46
46
|
};
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region ../packages/common/src/utils/indent/indent.utils.ts
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param lines The lines of code to indent.
|
|
52
|
-
* @return An array of indented lines.
|
|
53
|
-
*/
|
|
54
|
-
function indent(...lines) {
|
|
55
|
-
return lines.map((line) => ` ${line}`);
|
|
49
|
+
function indent(lines) {
|
|
50
|
+
return typeof lines === "string" ? ` ${lines}` : lines.map((line) => ` ${line}`);
|
|
56
51
|
}
|
|
57
52
|
//#endregion
|
|
58
53
|
//#region ../packages/common/src/costants/not-alllowed-tags.constants.ts
|