theta-client-react-native
Version:
This library provides a way to control RICOH THETA using.
22 lines (21 loc) • 678 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.convertOptions = convertOptions;
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