@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schukai/monster",
3
- "version": "3.35.3",
3
+ "version": "3.35.4",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -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
 
@@ -142,7 +142,7 @@ function getMonsterVersion() {
142
142
  }
143
143
 
144
144
  /** don't touch, replaced by make with package.json version */
145
- monsterVersion = new Version("3.35.3");
145
+ monsterVersion = new Version("3.35.4");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.35.3")
10
+ monsterVersion = new Version("3.35.4")
11
11
 
12
12
  let m = getMonsterVersion();
13
13