Hi,
this line doesn't seem to do anything:
|
const $defs = $svg.find('defs'); |
It seems to look for <defs> tags in $svg.children() to extract them and put them before any other <symbol> tags of the sprite SVG - but this is a newly created empty cheerio variable (new SVG element), right?