concordancejs / concordance

Compare, format, diff and serialize any JavaScript value
ISC License
207 stars 15 forks source link

Implement maxDepth() on SingleValueFormatter #35

Closed novemberborn closed 7 years ago

novemberborn commented 7 years ago

Fix for https://github.com/avajs/ava/issues/1433. The react plugin increases value indentation for properties. Combined with maxDepth this can lead to property values exceeding the max depth. The maxDepth() function is required on SingleValueFormatter so the property name is still included in the formatted output.