MCPcopy Index your code
hub / github.com/tinyhttp/tinyhttp / isEmptyObject

Function isEmptyObject

examples/faunadb/index.js:6–6  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

4import { json } from 'milliparsec'
5
6const isEmptyObject = (obj) => Object.keys(obj).length === 0 && obj.constructor === Object
7
8const hasPostProps = (obj) => Object.keys(obj).every((x) => ['name', 'description', 'price', 'quantity'].includes(x))
9

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected