MCPcopy
hub / github.com/canvg/canvg / toNumbers

Function toNumbers

src/util/string.ts:35–39  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

33 * @returns Numbers array.
34 */
35export function toNumbers(str: string) {
36 const matches = str.match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)
37
38 return matches ? matches.map(parseFloat) : []
39}
40
41/**
42 * String to matrix value.

Callers 13

util.spec.tsFile · 0.90
parseMethod · 0.90
parseScaleMethod · 0.90
parsePathMethod · 0.90
renderMethod · 0.90
calcValueMethod · 0.90
measureTargetTextMethod · 0.90
constructorMethod · 0.90
setContextFunction · 0.90
setContextMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…