@schukai/monster 3.35.3 → 3.35.4
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
package/source/dom/dimension.mjs
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
import { getWindow } from "./util.mjs";
|
9
|
+
import { validateString } from "../types/validate.mjs";
|
9
10
|
|
10
11
|
export { convertToPixels, getDeviceDPI };
|
11
12
|
|
@@ -74,6 +75,10 @@ function getDeviceDPI() {
|
|
74
75
|
*/
|
75
76
|
|
76
77
|
function convertToPixels(value, parentElement = document.documentElement, fontSizeElement = document.documentElement) {
|
78
|
+
|
79
|
+
validateString(value);
|
80
|
+
|
81
|
+
|
77
82
|
const regex = /^(-?[\d.]+)(.*)$/;
|
78
83
|
const matchResult = value.match(regex);
|
79
84
|
|
package/source/types/version.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED