dazscript-framework 1.0.28 → 1.0.29
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 +1 -1
- package/src/helpers/script-helper.ts +17 -1
package/package.json
CHANGED
|
@@ -13,4 +13,20 @@ export const getScriptPath = (): string => {
|
|
|
13
13
|
fileInfo.deleteLater();
|
|
14
14
|
|
|
15
15
|
return path;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const getScriptArguments = (): any[] => {
|
|
19
|
+
try {
|
|
20
|
+
return typeof getArguments === 'function' ? getArguments() : []
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
return []
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const getStringScriptArguments = (): string[] => {
|
|
28
|
+
const args = getScriptArguments()
|
|
29
|
+
const values: string[] = []
|
|
30
|
+
for (let index = 0; index < args.length; index++) values.push(String(args[index]))
|
|
31
|
+
return values
|
|
32
|
+
}
|