(labels)
| 215 | |
| 216 | const sharedLabelCache = new WeakMap(); |
| 217 | function flattenSharedLabels(labels) { |
| 218 | const cached = sharedLabelCache.get(labels); |
| 219 | if (cached) { |
| 220 | return cached; |
| 221 | } |
| 222 | |
| 223 | const formattedLabels = formatLabels(labels); |
| 224 | const flattened = formattedLabels.join(','); |
| 225 | sharedLabelCache.set(labels, flattened); |
| 226 | return flattened; |
| 227 | } |
| 228 | function escapeLabelValue(str) { |
| 229 | if (typeof str !== 'string') { |
| 230 | return str; |
no test coverage detected