hrenpack_js 3.1.5 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -926,3 +926,13 @@ function generateUUIDv4() {
926
926
  }
927
927
  //# sourceMappingURL=uuid.js.map
928
928
 
929
+
930
+ // string.js
931
+ function stringToBoolean(input) {
932
+ if (input.toLowerCase() === "true")
933
+ return true;
934
+ if (input.toLowerCase() === "false")
935
+ return false;
936
+ return null;
937
+ }
938
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrenpack_js",
3
- "version": "3.1.5",
3
+ "version": "3.2.0",
4
4
  "description": "Универсальная frontend библиотека javascript/typescript для большинства задач",
5
5
  "main": "index.js",
6
6
  "repository": {
package/string.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function stringToBoolean(input: string): NullBool;
2
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAIhD"}
package/string.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ function stringToBoolean(input) {
3
+ if (input.toLowerCase() === "true")
4
+ return true;
5
+ if (input.toLowerCase() === "false")
6
+ return false;
7
+ return null;
8
+ }
9
+ //# sourceMappingURL=string.js.map
package/string.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":";AAAA,SAAS,eAAe,CAAC,KAAa;IAClC,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IAChD,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAClD,OAAO,IAAI,CAAA;AACf,CAAC"}
package/types.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- /*
2
- * hrenpack_js 3.1.2
3
- * Copyright (c) 2024-2025, Маг Ильяс DOMA (MagIlyasDOMA)
4
- * Licensed under MIT (https://github.com/MagIlyasDOMA/hrenpack_js/blob/main/LICENSE)
5
- */
6
-
1
+ /*
2
+ * hrenpack_js 3.1.2
3
+ * Copyright (c) 2024-2025, Маг Ильяс DOMA (MagIlyasDOMA)
4
+ * Licensed under MIT (https://github.com/MagIlyasDOMA/hrenpack_js/blob/main/LICENSE)
5
+ */
6
+
7
7
  type NullStr = string | null;
8
8
  type NullNum = number | null;
9
9
  type Dict = {
@@ -13,4 +13,5 @@ type StringDict = {
13
13
  [key: string]: string;
14
14
  };
15
15
  type NumStr = number | string;
16
+ type NullBool = boolean | null;
16
17
  //# sourceMappingURL=types.d.ts.map