UNPKG

fabric

Version:

Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.

1 lines 709 B
{"version":3,"file":"cleanupSvgAttribute.min.mjs","sources":["../../../../src/util/internals/cleanupSvgAttribute.ts"],"sourcesContent":["import { reNum } from '../../parser/constants';\n\nconst regex = new RegExp(`(${reNum})`, 'gi');\n\nexport const cleanupSvgAttribute = (attributeValue: string) =>\n attributeValue\n .replace(regex, ' $1 ')\n // replace annoying commas and arbitrary whitespace with single spaces\n .replace(/,/gi, ' ')\n .replace(/\\s+/gi, ' ');\n"],"names":["regex","RegExp","concat","reNum","cleanupSvgAttribute","attributeValue","replace"],"mappings":"uDAEA,MAAMA,EAAQ,IAAIC,OAAM,IAAAC,OAAKC,EAAU,KAAA,MAE1BC,EAAuBC,GAClCA,EACGC,QAAQN,EAAO,QAEfM,QAAQ,MAAO,KACfA,QAAQ,QAAS"}