@unikue/ts-lang-utils 1.0.0 → 1.1.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.
@@ -4,4 +4,4 @@ export interface IgnorableErrorConstructor extends ErrorConstructor {
4
4
  (message?: string): IgnorableError;
5
5
  readonly prototype: IgnorableError;
6
6
  }
7
- export declare let IgnorableError: IgnorableErrorConstructor;
7
+ export declare const IgnorableError: IgnorableErrorConstructor;
@@ -22,7 +22,7 @@ __export(IgnorableError_exports, {
22
22
  IgnorableError: () => IgnorableError
23
23
  });
24
24
  module.exports = __toCommonJS(IgnorableError_exports);
25
- var IgnorableError;
25
+ var IgnorableError = Error;
26
26
  // Annotate the CommonJS export names for ESM import in node:
27
27
  0 && (module.exports = {
28
28
  IgnorableError
@@ -4,4 +4,4 @@ export interface UnsupportedErrorConstructor extends ErrorConstructor {
4
4
  (message?: string): UnsupportedError;
5
5
  readonly prototype: UnsupportedError;
6
6
  }
7
- export declare let UnsupportedError: UnsupportedErrorConstructor;
7
+ export declare const UnsupportedError: UnsupportedErrorConstructor;
@@ -22,7 +22,7 @@ __export(UnsupportedError_exports, {
22
22
  UnsupportedError: () => UnsupportedError
23
23
  });
24
24
  module.exports = __toCommonJS(UnsupportedError_exports);
25
- var UnsupportedError;
25
+ var UnsupportedError = Error;
26
26
  // Annotate the CommonJS export names for ESM import in node:
27
27
  0 && (module.exports = {
28
28
  UnsupportedError
@@ -26,7 +26,7 @@ function hslToHex(hsl) {
26
26
  if (!hsl) {
27
27
  return void 0;
28
28
  }
29
- let alias = null;
29
+ let alias;
30
30
  if (typeof hsl === "string") {
31
31
  const arr = /hsl\((\d+),\s*([\d.]+),\s*([\d.]+)\)/.exec(hsl);
32
32
  if (!arr || arr.length !== 4) {
@@ -26,7 +26,7 @@ function reverseRgb(rgb) {
26
26
  if (!rgb) {
27
27
  return void 0;
28
28
  }
29
- let alias = null;
29
+ let alias;
30
30
  if (typeof rgb === "string") {
31
31
  const arr = rgb.match(/\d+/g);
32
32
  if (!arr || arr.length !== 3) {
@@ -26,7 +26,7 @@ function rgbToHex(rgb) {
26
26
  if (!rgb) {
27
27
  return void 0;
28
28
  }
29
- let alias = null;
29
+ let alias;
30
30
  if (typeof rgb === "string") {
31
31
  const arr = rgb.match(/\d+/g);
32
32
  if (!arr || arr.length !== 3) {
@@ -46,7 +46,7 @@ function formatPercent(text, ...params) {
46
46
  case "x":
47
47
  case "X":
48
48
  try {
49
- let value = void 0;
49
+ let value;
50
50
  if (typeof param === "string") {
51
51
  value = Number.parseInt(param);
52
52
  } else if (param instanceof String) {
@@ -75,7 +75,7 @@ function formatPercent(text, ...params) {
75
75
  break;
76
76
  case "f":
77
77
  try {
78
- let value = void 0;
78
+ let value;
79
79
  if (typeof param === "string") {
80
80
  value = Number.parseFloat(param);
81
81
  } else if (param instanceof String) {
@@ -4,4 +4,4 @@ export interface IgnorableErrorConstructor extends ErrorConstructor {
4
4
  (message?: string): IgnorableError;
5
5
  readonly prototype: IgnorableError;
6
6
  }
7
- export declare let IgnorableError: IgnorableErrorConstructor;
7
+ export declare const IgnorableError: IgnorableErrorConstructor;
@@ -1 +1 @@
1
- export var IgnorableError;
1
+ export var IgnorableError = Error;
@@ -4,4 +4,4 @@ export interface UnsupportedErrorConstructor extends ErrorConstructor {
4
4
  (message?: string): UnsupportedError;
5
5
  readonly prototype: UnsupportedError;
6
6
  }
7
- export declare let UnsupportedError: UnsupportedErrorConstructor;
7
+ export declare const UnsupportedError: UnsupportedErrorConstructor;
@@ -1 +1 @@
1
- export var UnsupportedError;
1
+ export var UnsupportedError = Error;
@@ -3,7 +3,7 @@ export function hslToHex(hsl) {
3
3
  if (!hsl) {
4
4
  return undefined;
5
5
  }
6
- var alias = null;
6
+ var alias;
7
7
  if (typeof hsl === 'string') {
8
8
  var arr = /hsl\((\d+),\s*([\d.]+),\s*([\d.]+)\)/.exec(hsl);
9
9
  if (!arr || arr.length !== 4) {
@@ -3,7 +3,7 @@ export function reverseRgb(rgb) {
3
3
  if (!rgb) {
4
4
  return undefined;
5
5
  }
6
- var alias = null;
6
+ var alias;
7
7
  if (typeof rgb === 'string') {
8
8
  var arr = rgb.match(/\d+/g);
9
9
  if (!arr || arr.length !== 3) {
@@ -3,7 +3,7 @@ export function rgbToHex(rgb) {
3
3
  if (!rgb) {
4
4
  return undefined;
5
5
  }
6
- var alias = null;
6
+ var alias;
7
7
  if (typeof rgb === 'string') {
8
8
  var arr = rgb.match(/\d+/g);
9
9
  if (!arr || arr.length !== 3) {
@@ -25,7 +25,7 @@ export function formatPercent(text) {
25
25
  case 'x':
26
26
  case 'X':
27
27
  try {
28
- var value = undefined;
28
+ var value = void 0;
29
29
  if (typeof param === 'string') {
30
30
  value = Number.parseInt(param);
31
31
  } else if (param instanceof String) {
@@ -54,7 +54,7 @@ export function formatPercent(text) {
54
54
  break;
55
55
  case 'f':
56
56
  try {
57
- var _value = undefined;
57
+ var _value = void 0;
58
58
  if (typeof param === 'string') {
59
59
  _value = Number.parseFloat(param);
60
60
  } else if (param instanceof String) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unikue/ts-lang-utils",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "title": "TsLangUtils",
5
5
  "description": "Common lang utilities for typescript",
6
6
  "homepage": "https://unikueltd.github.io/ts-lang-utils",
@@ -50,28 +50,31 @@
50
50
  "test:coverage": "del-cli ./coverage && jest --coverage --coverageDirectory ./coverage"
51
51
  },
52
52
  "dependencies": {
53
- "@babel/runtime": "^7.28.4",
53
+ "@babel/runtime": "^7.29.2",
54
54
  "@imranbarbhuiya/duration": "^5.1.8",
55
- "lodash": "^4.17.21",
56
- "nanoid": "^3.3.8",
57
- "universal-cookie": "^8.0.1"
55
+ "lodash": "^4.18.1",
56
+ "nanoid": "^3.3.12",
57
+ "universal-cookie": "^8.1.2"
58
58
  },
59
59
  "devDependencies": {
60
- "@eslint/eslintrc": "^3.3.1",
61
- "@eslint/js": "^9.35.0",
60
+ "@eslint/eslintrc": "^3.3.5",
61
+ "@eslint/js": "^10.0.1",
62
62
  "@types/jest": "^30.0.0",
63
- "@types/lodash": "^4.17.20",
64
- "@typescript-eslint/eslint-plugin": "^8.43.0",
65
- "@unikue/babel-plugin-remove-comment": "^1.0.0",
66
- "@unikue/typedoc-plugin-raw-content": "~1.0.0",
67
- "@unikue/typedoc-theme-dumi": "~1.0.0",
68
- "del-cli": "^6.0.0",
69
- "father": "^4.6.4",
63
+ "@types/lodash": "^4.17.24",
64
+ "@typescript-eslint/eslint-plugin": "^8.59.1",
65
+ "@unikue/babel-plugin-remove-comment": "^1.2.0",
66
+ "@unikue/typedoc-plugin-raw-content": "^1.1.0",
67
+ "@unikue/typedoc-theme-dumi": "^1.1.0",
68
+ "del-cli": "^7.0.0",
69
+ "eslint": "^10.3.0",
70
+ "eslint-plugin-jest": "^29.15.2",
71
+ "father": "^4.6.19",
70
72
  "gh-pages": "^6.3.0",
71
- "globals": "^16.4.0",
72
- "ts-jest": "^29.4.1",
73
- "typedoc": "~0.28.12",
74
- "typescript": "^5.9.2"
73
+ "globals": "^17.6.0",
74
+ "ts-jest": "^29.4.9",
75
+ "typedoc": "~0.28.19",
76
+ "typescript": "^6.0.3",
77
+ "typescript-eslint": "^8.59.1"
75
78
  },
76
79
  "peerDependencies": {
77
80
  "typescript": ">=4"