fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
1 lines • 849 B
Source Map (JSON)
{"version":3,"file":"cleanupSvgAttribute.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":";;AAEA,MAAMA,KAAK,GAAG,IAAIC,MAAM,CAAA,GAAA,CAAAC,MAAA,CAAKC,KAAK,EAAK,GAAA,CAAA,EAAA,IAAI,CAAC,CAAA;AAErC,MAAMC,mBAAmB,GAAIC,cAAsB,IACxDA,cAAc,CACXC,OAAO,CAACN,KAAK,EAAE,MAAM,CAAA;AACtB;AAAA,CACCM,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CACnBA,OAAO,CAAC,OAAO,EAAE,GAAG;;;;"}