MCPcopy
hub / github.com/wavedrom/wavedrom / reparse

Function reparse

wavedrom.js:2241–2263  ·  view source on GitHub ↗
(React)

Source from the content-addressed store, hash-verified

2239}
2240
2241function reparse (React) {
2242
2243 var $ = React.createElement;
2244
2245 function reTspan (e, i) {
2246 var tag = e[0];
2247 var attr = e[1];
2248
2249 var newAttr = Object.keys(attr).reduce(function (res, key) {
2250 var newKey = deDash(key);
2251 res[newKey] = attr[key];
2252 return res;
2253 }, {});
2254
2255 var body = e[2];
2256 newAttr.key = i;
2257 return $(tag, newAttr, body);
2258 }
2259
2260 return function (str) {
2261 return parse(str).map(reTspan);
2262 };
2263}
2264
2265module.exports = reparse;
2266

Callers

nothing calls this directly

Calls 1

parseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…