blob: 44bd6c64652174a497e3f5d35691e78a740b2d98 [file]
/*
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import formatters from "./formatters/index.mjs";
globalThis.devtoolsFormatters = Array.isArray(globalThis.devtoolsFormatters) ? globalThis.devtoolsFormatters : []
globalThis.devtoolsFormatters.push({
header(value, configObject) {
const formatter = formatters.get(value);
return formatter ? formatter.header(value) : null;
},
hasBody(value) {
const formatter = formatters.get(value);
return formatter?.body !== undefined;
},
body(value) {
const formatter = formatters.get(value);
return formatter?.body ? formatter.body(value) : null;
}
})