IOweb/node_modules/@iconify/tools/lib/svg/analyse/error.mjs
2026-07-03 15:07:38 -05:00

14 lines
376 B
JavaScript

function analyseTagError(element) {
let result = "<" + element.tagName;
if (element._id) {
result += ' id="' + element._id + '"';
}
const attribs = element.attribs;
if (attribs["d"]) {
const value = attribs["d"];
result += ' d="' + (value.length > 16 ? value.slice(0, 12) + "..." : value) + '"';
}
return result + ">";
}
export { analyseTagError };