MCPcopy Index your code
hub / github.com/plotly/plotly.js / multDivParser

Function multDivParser

src/lib/index.js:1096–1100  ·  view source on GitHub ↗
(inputStr)

Source from the content-addressed store, hash-verified

1094// For example, the following strings are matched: `x0*2`, `slope/1.60934`, `y1*2.54`
1095var MULT_DIV_REGEX = /^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;
1096function multDivParser(inputStr) {
1097 var match = inputStr.match(MULT_DIV_REGEX);
1098 if (match) return { key: match[1], op: match[2], number: Number(match[3]) };
1099 return { key: inputStr, op: null, number: null };
1100}
1101var texttemplateWarningsForShapes = {
1102 max: 10,
1103 count: 0,

Callers 1

templateFormatStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…