}
return (sortedDataSet[middleIndex - 1] + sortedDataSet[middleIndex]) / 2
}
+
+export const isPlainObject = (obj: unknown): boolean =>
+ typeof obj === 'object' &&
+ obj !== null &&
+ obj?.constructor === Object &&
+ Object.prototype.toString.call(obj) === '[object Object]'