dazscript-framework 1.0.26 → 1.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dazscript-framework",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "author": "Freddy Diaz",
5
5
  "license": "MPL-2.0",
6
6
  "description": "",
@@ -22,6 +22,12 @@ export const trimEnd = (source: string, search: string): string => {
22
22
  return source.endsWith(search) ? source.slice(0, -search.length) : source
23
23
  }
24
24
 
25
+ export const repeat = (source: string, count: number): string => {
26
+ let value = ''
27
+ for (let i = 0; i < count; i++) value += source
28
+ return value
29
+ }
30
+
25
31
  export const count = (source: string, search: string): number => {
26
32
  return source.split(search).length - 1
27
33
  }
@@ -37,4 +43,4 @@ export const getFileNameWithoutExtension = (filePath: string | null | undefined)
37
43
  const fileWithExt = filePath.substring(lastSlash + 1)
38
44
  const lastDot = fileWithExt.lastIndexOf('.')
39
45
  return lastDot > 0 ? fileWithExt.substring(0, lastDot) : fileWithExt
40
- }
46
+ }