namirasoft-core 1.4.12 → 1.4.13

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.
Files changed (54) hide show
  1. package/dist/EncryptionOperation.js +17 -7
  2. package/dist/EncryptionOperation.js.map +1 -1
  3. package/dist/HashOperation.js +17 -7
  4. package/dist/HashOperation.js.map +1 -1
  5. package/dist/PhoneOperation.js +17 -7
  6. package/dist/PhoneOperation.js.map +1 -1
  7. package/dist/SortItem.d.ts +24 -0
  8. package/dist/SortItem.js +75 -0
  9. package/dist/SortItem.js.map +1 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/package.json +4 -4
  14. package/src/BaseDatabaseRow.ts +6 -6
  15. package/src/BaseMetaColumn.ts +13 -13
  16. package/src/BaseMetaTable.ts +24 -24
  17. package/src/BaseServer.ts +107 -107
  18. package/src/CacheService.ts +57 -57
  19. package/src/ConsoleOperation.ts +68 -68
  20. package/src/ConvertService.ts +100 -100
  21. package/src/CookieService.ts +33 -33
  22. package/src/Countries.ts +486 -486
  23. package/src/Country.ts +21 -21
  24. package/src/CountryOperation.ts +98 -98
  25. package/src/EncodingOperation.ts +12 -12
  26. package/src/EncryptionOperation.ts +40 -40
  27. package/src/EnvService.ts +22 -22
  28. package/src/ErrorOperation.ts +13 -13
  29. package/src/FileOperation.ts +57 -57
  30. package/src/FilterItem.ts +128 -128
  31. package/src/FilterItemColumnType.ts +6 -6
  32. package/src/FilterItemOperator.ts +51 -51
  33. package/src/GeoOperation.ts +18 -18
  34. package/src/HTTPError.ts +8 -8
  35. package/src/HTTPMethod.ts +6 -6
  36. package/src/HashOperation.ts +24 -24
  37. package/src/IStorage.ts +5 -5
  38. package/src/IStorageCookie.ts +52 -52
  39. package/src/IStorageJsonFile.ts +45 -45
  40. package/src/IStorageLocal.ts +16 -16
  41. package/src/IStorageMemory.ts +17 -17
  42. package/src/NamingConvention.ts +107 -107
  43. package/src/ObjectService.ts +27 -27
  44. package/src/PackageService.ts +76 -76
  45. package/src/PhoneOperation.ts +8 -8
  46. package/src/PriceOperation.ts +18 -18
  47. package/src/RegexTemplate.ts +7 -7
  48. package/src/SearchOperation.ts +29 -29
  49. package/src/SortItem.ts +89 -0
  50. package/src/StringOperation.ts +18 -18
  51. package/src/TimeOperation.ts +262 -262
  52. package/src/URLOperation.ts +54 -54
  53. package/src/VersionOperation.ts +46 -46
  54. package/src/index.ts +40 -39
@@ -1,47 +1,47 @@
1
- export class VersionOperation
2
- {
3
- static forEach(v1: string, v2: string, handler: (e1: number, e2: number) => boolean, onEqual: boolean): boolean
4
- {
5
- if (!v1 || !v2)
6
- return false;
7
- let t1s = v1.split('.');
8
- let t2s = v2.split('.');
9
- let len = Math.max(t1s.length, t2s.length);
10
- for (let i = 0; i < len; i++)
11
- {
12
- let e1 = 0;
13
- let e2 = 0;
14
- if (i < t1s.length)
15
- e1 = parseInt(t1s[i]);
16
- if (i < t2s.length)
17
- e2 = parseInt(t2s[i]);
18
- if (e1 != e2)
19
- return handler(e1, e2);
20
- }
21
- return onEqual;
22
- }
23
- static isGreaterThan(v1: string, v2: string): boolean
24
- {
25
- return this.forEach(v1, v2, (e1: number, e2: number) => e1 > e2, false);
26
- }
27
-
28
- static isLessThan(v1: string, v2: string): boolean
29
- {
30
- return this.forEach(v1, v2, (e1: number, e2: number) => e1 < e2, false);
31
- }
32
-
33
- static isEqual(v1: string, v2: string): boolean
34
- {
35
- return this.forEach(v1, v2, () => false, true);
36
- }
37
-
38
- static isGreaterThanOrEqual(v1: string, v2: string): boolean
39
- {
40
- return this.forEach(v1, v2, (e1: number, e2: number) => e1 > e2, true);
41
- }
42
-
43
- static isLessThanOrEqual(v1: string, v2: string): boolean
44
- {
45
- return this.forEach(v1, v2, (e1: number, e2: number) => e1 < e2, true);
46
- }
1
+ export class VersionOperation
2
+ {
3
+ static forEach(v1: string, v2: string, handler: (e1: number, e2: number) => boolean, onEqual: boolean): boolean
4
+ {
5
+ if (!v1 || !v2)
6
+ return false;
7
+ let t1s = v1.split('.');
8
+ let t2s = v2.split('.');
9
+ let len = Math.max(t1s.length, t2s.length);
10
+ for (let i = 0; i < len; i++)
11
+ {
12
+ let e1 = 0;
13
+ let e2 = 0;
14
+ if (i < t1s.length)
15
+ e1 = parseInt(t1s[i]);
16
+ if (i < t2s.length)
17
+ e2 = parseInt(t2s[i]);
18
+ if (e1 != e2)
19
+ return handler(e1, e2);
20
+ }
21
+ return onEqual;
22
+ }
23
+ static isGreaterThan(v1: string, v2: string): boolean
24
+ {
25
+ return this.forEach(v1, v2, (e1: number, e2: number) => e1 > e2, false);
26
+ }
27
+
28
+ static isLessThan(v1: string, v2: string): boolean
29
+ {
30
+ return this.forEach(v1, v2, (e1: number, e2: number) => e1 < e2, false);
31
+ }
32
+
33
+ static isEqual(v1: string, v2: string): boolean
34
+ {
35
+ return this.forEach(v1, v2, () => false, true);
36
+ }
37
+
38
+ static isGreaterThanOrEqual(v1: string, v2: string): boolean
39
+ {
40
+ return this.forEach(v1, v2, (e1: number, e2: number) => e1 > e2, true);
41
+ }
42
+
43
+ static isLessThanOrEqual(v1: string, v2: string): boolean
44
+ {
45
+ return this.forEach(v1, v2, (e1: number, e2: number) => e1 < e2, true);
46
+ }
47
47
  }
package/src/index.ts CHANGED
@@ -1,40 +1,41 @@
1
- export * from "./BaseDatabaseRow";
2
- export * from "./BaseMetaColumn";
3
- export * from "./BaseMetaTable";
4
- export * from "./BaseServer";
5
- export * from "./CacheService";
6
- export * from "./ConsoleOperation";
7
- export * from "./CookieService";
8
- export * from "./Countries";
9
- export * from "./ConvertService";
10
- export * from "./Country";
11
- export * from "./CountryOperation";
12
- export * from "./EncodingOperation";
13
- export * from "./EncryptionOperation";
14
- export * from "./EnvService";
15
- export * from "./ErrorOperation";
16
- export * from "./FileOperation";
17
- export * from "./FilterItem";
18
- export * from "./FilterItemColumnType";
19
- export * from "./FilterItemOperator";
20
- export * from "./GeoOperation";
21
- export * from "./HashOperation";
22
- export * from "./HTTPError";
23
- export * from "./HTTPMethod";
24
- export * from "./IStorage";
25
- export * from "./IStorageCookie";
26
- export * from "./IStorageJsonFile";
27
- export * from "./IStorageLocal";
28
- export * from "./IStorageMemory";
29
- export * from "./NamingConvention";
30
- export * from "./ObjectService";
31
- export * from "./PackageService";
32
- export * from "./ParsedNameValue";
33
- export * from "./PhoneOperation";
34
- export * from "./PriceOperation";
35
- export * from "./RegexTemplate";
36
- export * from "./SearchOperation";
37
- export * from "./StringOperation";
38
- export * from "./TimeOperation";
39
- export * from "./URLOperation";
1
+ export * from "./BaseDatabaseRow";
2
+ export * from "./BaseMetaColumn";
3
+ export * from "./BaseMetaTable";
4
+ export * from "./BaseServer";
5
+ export * from "./CacheService";
6
+ export * from "./ConsoleOperation";
7
+ export * from "./CookieService";
8
+ export * from "./Countries";
9
+ export * from "./ConvertService";
10
+ export * from "./Country";
11
+ export * from "./CountryOperation";
12
+ export * from "./EncodingOperation";
13
+ export * from "./EncryptionOperation";
14
+ export * from "./EnvService";
15
+ export * from "./ErrorOperation";
16
+ export * from "./FileOperation";
17
+ export * from "./FilterItem";
18
+ export * from "./FilterItemColumnType";
19
+ export * from "./FilterItemOperator";
20
+ export * from "./GeoOperation";
21
+ export * from "./HashOperation";
22
+ export * from "./HTTPError";
23
+ export * from "./HTTPMethod";
24
+ export * from "./IStorage";
25
+ export * from "./IStorageCookie";
26
+ export * from "./IStorageJsonFile";
27
+ export * from "./IStorageLocal";
28
+ export * from "./IStorageMemory";
29
+ export * from "./NamingConvention";
30
+ export * from "./ObjectService";
31
+ export * from "./PackageService";
32
+ export * from "./ParsedNameValue";
33
+ export * from "./PhoneOperation";
34
+ export * from "./PriceOperation";
35
+ export * from "./RegexTemplate";
36
+ export * from "./SearchOperation";
37
+ export * from "./SortItem";
38
+ export * from "./StringOperation";
39
+ export * from "./TimeOperation";
40
+ export * from "./URLOperation";
40
41
  export * from "./VersionOperation";