src/isRecord.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const proto = Object.prototype
const gpo = Object.getPrototypeOf

export default (obj: unknown): obj is Record<string, unknown> =>
  obj === null || typeof obj !== "object" ? false : gpo(obj) === proto