@cognigy/rest-api-client
Version:
Cognigy REST-Client
19 lines • 467 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseArray = void 0;
const parseArray = (value) => {
try {
if (typeof value === "string") {
value = JSON.parse(value);
}
else {
return value;
}
}
catch (_a) {
return [value];
}
return typeof value === "object" ? value : [value];
};
exports.parseArray = parseArray;
//# sourceMappingURL=array.js.map