9 lines
234 B
Plaintext
9 lines
234 B
Plaintext
|
function getSVGViewBox(value) {
|
||
|
const result = value.trim().split(/\s+/).map(Number);
|
||
|
if (result.length === 4 && result.reduce((prev, value2) => prev && !isNaN(value2), true)) {
|
||
|
return result;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export { getSVGViewBox };
|