21 lines
541 B
JavaScript
21 lines
541 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.parseJsonValue = parseJsonValue;
|
|
function parseJsonValue({ value }) {
|
|
if (value === undefined || value === null || value === '') {
|
|
return undefined;
|
|
}
|
|
if (typeof value === 'object') {
|
|
return value;
|
|
}
|
|
if (typeof value === 'string') {
|
|
try {
|
|
return JSON.parse(value);
|
|
}
|
|
catch {
|
|
return value;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
//# sourceMappingURL=json-transform.util.js.map
|