@tb-dev/utils 1.4.3 → 1.5.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/dist/index.cjs CHANGED
@@ -16,6 +16,8 @@ function isEmpty(value) {
16
16
  function isNullish(value) {
17
17
  return value === null || value === void 0;
18
18
  }
19
+ const noop = () => {
20
+ };
19
21
  function toPixel(value) {
20
22
  if (typeof value === "number" || typeof value === "string" && regex.float.test(value)) {
21
23
  return `${value}px`;
@@ -24,4 +26,5 @@ function toPixel(value) {
24
26
  }
25
27
  exports.isEmpty = isEmpty;
26
28
  exports.isNullish = isNullish;
29
+ exports.noop = noop;
27
30
  exports.toPixel = toPixel;
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@
9
9
  */
10
10
  export declare function isEmpty(value?: unknown): boolean;
11
11
  export declare function isNullish(value: unknown): value is null | undefined;
12
+ export declare const noop: () => void;
12
13
  /**
13
14
  * Add the pixel unit to a value.
14
15
  * If the value is a string, it is returned unchanged.
package/dist/index.js CHANGED
@@ -14,6 +14,8 @@ function isEmpty(value) {
14
14
  function isNullish(value) {
15
15
  return value === null || value === void 0;
16
16
  }
17
+ const noop = () => {
18
+ };
17
19
  function toPixel(value) {
18
20
  if (typeof value === "number" || typeof value === "string" && float.test(value)) {
19
21
  return `${value}px`;
@@ -23,5 +25,6 @@ function toPixel(value) {
23
25
  export {
24
26
  isEmpty,
25
27
  isNullish,
28
+ noop,
26
29
  toPixel
27
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tb-dev/utils",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "TypeScript utils",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,20 +28,20 @@
28
28
  "*.{?(c|m)@(j|t)s,vue}": "pnpm run lint"
29
29
  },
30
30
  "dependencies": {
31
- "@tb-dev/utility-types": "^1.2.4"
31
+ "@tb-dev/utility-types": "^1.2.5"
32
32
  },
33
33
  "devDependencies": {
34
- "@tb-dev/eslint-config": "^3.3.1",
35
- "@types/node": "^20.11.30",
34
+ "@tb-dev/eslint-config": "^3.4.0",
35
+ "@types/node": "^20.12.5",
36
36
  "eslint": "^8.57.0",
37
37
  "husky": "^9.0.11",
38
38
  "lint-staged": "^15.2.2",
39
39
  "prettier": "^3.2.5",
40
40
  "tslib": "^2.6.2",
41
41
  "typedoc": "^0.25.12",
42
- "typedoc-plugin-mdn-links": "^3.1.18",
43
- "typescript": "^5.4.3",
44
- "vite": "^5.2.7",
42
+ "typedoc-plugin-mdn-links": "^3.1.19",
43
+ "typescript": "^5.4.4",
44
+ "vite": "^5.2.8",
45
45
  "vite-plugin-dts": "^3.8.1"
46
46
  },
47
47
  "files": [