@har-sdk/openapi-sampler
Version:
[](https://codeclimate.com/github/NeuraLegion/har-sdk/maintainability) [ => obj && typeof obj === 'object';
export const mergeDeep = (...objects) => objects.reduce((prev, obj) => {
Object.keys(obj).forEach((key) => {
const pVal = prev[key];
const oVal = obj[key];
if (isObject(pVal) && isObject(oVal)) {
prev[key] = mergeDeep(pVal, oVal);
}
else {
prev[key] = oVal;
}
});
return prev;
}, Array.isArray(objects[objects.length - 1]) ? [] : {});
export const firstArrayElement = (x) => x[0];
export const getReplacementForCircular = (type) => ({
value: type === 'object' ? {} : type === 'array' ? [] : undefined
});
export const hasExample = (schema) => schema.example !== undefined;
export const hasDefault = (schema) => schema.default !== undefined;
export const hasItems = (schema) => schema.items !== undefined;
export const isReference = (schema) => schema.$ref !== undefined;
//# sourceMappingURL=utils.js.map