MCPcopy
hub / github.com/iamkun/dayjs / isObject

Function isObject

src/plugin/objectSupport/index.js:3–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1export default (o, c, dayjs) => {
2 const proto = c.prototype
3 const isObject = obj => obj !== null && !(obj instanceof Date) && !(obj instanceof Array)
4 && !proto.$utils().u(obj) && (obj.constructor.name === 'Object')
5 const prettyUnit = (u) => {
6 const unit = proto.$utils().p(u)
7 return unit === 'date' ? 'day' : unit

Callers 1

parseDateFunction · 0.85

Calls 1

$utilsMethod · 0.80

Tested by

no test coverage detected