theta-client-react-native
Version:
This library provides a way to control RICOH THETA using.
16 lines • 564 B
JavaScript
export function convertOptions(options, jsonOptions) {
if (!jsonOptions) {
return options;
}
const result = {
...options
};
let jsonString = JSON.stringify(jsonOptions);
jsonString = jsonString.replace(/\\"/g, '"').replace(/\\n/g, '').replace(/"{/g, '{').replace(/}"/g, '}');
const parsedOptions = JSON.parse(jsonString);
if (parsedOptions.topBottomCorrectionRotationSupport) {
result.topBottomCorrectionRotationSupport = parsedOptions.topBottomCorrectionRotationSupport;
}
return result;
}
//# sourceMappingURL=convert-utils.js.map