import s2r from 'string2react'
const str = `
a a a b
a a a c
d d d
`;
s2r(str)
/*
{ '$$maxWidth': 4,
'$$maxHeight': 3,
a:
{ width: 4,
height: 2,
index: 1,
startRowIndex: 0,
startColIndex: 0 },
b:
{ width: 1,
height: 1,
index: 0,
startRowIndex: 0,
startColIndex: 3 },
c:
{ width: 1,
height: 1,
index: 1,
startRowIndex: 1,
startColIndex: 3 },
d:
{ width: 3,
height: 1,
index: 2,
startRowIndex: 2,
startColIndex: 0 } }
*/
string2rect
0.0.3 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i string2rect
Weekly Downloads
2
Version
0.0.3
License
MIT
Unpacked Size
7.6 kB
Total Files
10