@bits-innovate/react-native-vstarcam 1.0.60 → 1.0.61
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/index.ts +13 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -440,7 +440,19 @@ class VStarCamClient {
|
|
|
440
440
|
for (const pair of pairs) {
|
|
441
441
|
const [key, value] = pair.split("=");
|
|
442
442
|
if (key && value) {
|
|
443
|
-
|
|
443
|
+
let cleanKey = key.trim();
|
|
444
|
+
// VStarCam often prefix variables with 'var '
|
|
445
|
+
if (cleanKey.startsWith("var ")) {
|
|
446
|
+
cleanKey = cleanKey.substring(4).trim();
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
let cleanValue = value.trim();
|
|
450
|
+
// Remove surrounding quotes if present
|
|
451
|
+
if (cleanValue.startsWith('"') && cleanValue.endsWith('"')) {
|
|
452
|
+
cleanValue = cleanValue.substring(1, cleanValue.length - 1);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
result[cleanKey] = cleanValue;
|
|
444
456
|
}
|
|
445
457
|
}
|
|
446
458
|
return result;
|