(o: object)
| 419 | |
| 420 | /** whether an object is an array, or has the prototype of a literal or none */ |
| 421 | export const isPlainObjectOrArray = (o: object): boolean => { |
| 422 | const proto = Object.getPrototypeOf(o) |
| 423 | return proto === Object.prototype || proto === null || Array.isArray(o) |
| 424 | } |
| 425 | |
| 426 | /** JSON Schema's object type, which excludes arrays and functions */ |
| 427 | export const isNonArray = (data: object): boolean => |
no outgoing calls
no test coverage detected