MCPcopy
hub / github.com/danger/danger-js / emptyValueOfCounterpart

Function emptyValueOfCounterpart

source/platforms/git/gitJSONToGitDSL.ts:122–129  ·  view source on GitHub ↗
(other: any)

Source from the content-addressed store, hash-verified

120 }
121
122 const emptyValueOfCounterpart = (other: any) => {
123 if (Array.isArray(other)) {
124 return []
125 } else if (isobject(diff.after)) {
126 return {}
127 }
128 return null
129 }
130
131 const beforeValue = diff.before || emptyValueOfCounterpart(diff.after)
132 const afterValue = diff.after || emptyValueOfCounterpart(diff.before)

Callers 1

JSONDiffForFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected