UNPKG

fabric

Version:

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

1 lines 686 B
{"version":3,"file":"cleanupSvgAttribute.min.mjs","names":[],"sources":["../../../../src/util/internals/cleanupSvgAttribute.ts"],"sourcesContent":["import { reNum } from '../../parser/constants';\nimport { normalizeWs } from './normalizeWhiteSpace';\n\nconst regex = new RegExp(`(${reNum})`, 'gi');\n\nexport const cleanupSvgAttribute = (attributeValue: string) =>\n normalizeWs(\n attributeValue\n .replace(regex, ' $1 ')\n // replace annoying commas and arbitrary whitespace with single spaces\n .replace(/,/gi, ' '),\n );\n"],"mappings":"mHAGA,MAAM,EAAY,OAAO,IAAI,EAAA,GAAU,KAAA,CAE1B,EAAuB,GAClC,EACE,EACG,QAAQ,EAAO,OAAA,CAEf,QAAQ,MAAO,IAAA,CAAA,CAAA,OAAA,KAAA"}