mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-23 16:54:12 +01:00
Import postman environments
https://feedback.yaak.app/p/import-postman-environments
This commit is contained in:
1 parent
25b110778a
commit
0520ef5d43
14 files changed
+421
-191
No files matched your search
@@ -376,7 +376,7 @@ function toArray<T>(value: unknown): T[] {
|
||||
/** Recursively render all nested object properties */
|
||||
function convertTemplateSyntax<T>(obj: T): T {
|
||||
if (typeof obj === 'string') {
|
||||
return obj.replace(/{{\s*(_\.)?([^}]+)\s*}}/g, '${[$2]}') as T;
|
||||
return obj.replace(/{{\s*(_\.)?([^}]*)\s*}}/g, (_m, _dot, expr) => '${[' + expr.trim() + ']}') as T;
|
||||
} else if (Array.isArray(obj) && obj != null) {
|
||||
return obj.map(convertTemplateSyntax) as T;
|
||||
} else if (typeof obj === 'object' && obj != null) {
|
||||
|
||||
Reference in new issue
Block a user