( a: number | boolean, b: number | boolean, options?: DiffOptions, )
| 115 | } |
| 116 | |
| 117 | function comparePrimitive( |
| 118 | a: number | boolean, |
| 119 | b: number | boolean, |
| 120 | options?: DiffOptions, |
| 121 | ) { |
| 122 | const aFormat = prettyFormat(a, FORMAT_OPTIONS); |
| 123 | const bFormat = prettyFormat(b, FORMAT_OPTIONS); |
| 124 | return aFormat === bFormat |
| 125 | ? getCommonMessage(NO_DIFF_MESSAGE, options) |
| 126 | : diffLinesUnified(aFormat.split('\n'), bFormat.split('\n'), options); |
| 127 | } |
| 128 | |
| 129 | function sortMap(map: Map<unknown, unknown>) { |
| 130 | return new Map([...map].sort()); |
no test coverage detected