@webdeveric/utils 0.83.0 → 0.83.1

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.
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.is = void 0;
4
- const is = (...values) => (input) => values.some((value) => Object.is(input, value));
4
+ const is = (...values) => {
5
+ if (!values.length) {
6
+ throw new Error('Values not provided');
7
+ }
8
+ return (input) => values.some((value) => Object.is(input, value));
9
+ };
5
10
  exports.is = is;
@@ -1 +1,6 @@
1
- export const is = (...values) => (input) => values.some((value) => Object.is(input, value));
1
+ export const is = (...values) => {
2
+ if (!values.length) {
3
+ throw new Error('Values not provided');
4
+ }
5
+ return (input) => values.some((value) => Object.is(input, value));
6
+ };
@@ -1,2 +1,4 @@
1
+ import type { NonEmptyArray } from '../../types/arrays.js';
1
2
  import type { TypePredicateFn } from '../../types/functions.js';
2
- export declare const is: <const T extends unknown[]>(...values: T) => TypePredicateFn<T[number]>;
3
+ import type { UnionOf } from '../../types/utils.js';
4
+ export declare const is: <const Values extends NonEmptyArray<unknown>>(...values: Values) => TypePredicateFn<UnionOf<Values>>;
@@ -7,4 +7,6 @@ export type BinaryNumberString = `0${'b' | 'B'}${number}`;
7
7
  export type ExponentiationString = `${number}${'e' | 'E'}${number}`;
8
8
  export type Int32 = Branded<number, 'Int32'>;
9
9
  export type UInt32 = Branded<number, 'UInt32'>;
10
- export type NumberRange = [min: number] | [min: number, max: undefined] | [min: number, max: number] | [min: undefined, max: number];
10
+ export type NumberRange = [
11
+ min: number
12
+ ] | [min: number, max: undefined] | [min: number, max: number] | [min: undefined, max: number];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webdeveric/utils",
3
3
  "description": "Just another collection of utilities.",
4
- "version": "0.83.0",
4
+ "version": "0.83.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -66,7 +66,7 @@
66
66
  "url": "https://github.com/webdeveric/utils/issues"
67
67
  },
68
68
  "homepage": "https://github.com/webdeveric/utils/#readme",
69
- "packageManager": "pnpm@11.9.0+sha512.bd682d5d03fe525ef7c9fd6780c6884d1e756ac4c9c9fe00c538782824310dcf90e3ddc4f53835f06dfaebd5085e41855e0bcbb3b60de2ac5bbab89e5036f03b",
69
+ "packageManager": "pnpm@11.11.0+sha512.4463f65fd80ed80d69bc1d4bf163ee94f605c7380fc318bb5b2ebe15f8cd12d49c51a4d59e951b401e764d3b6ca751cbf51bc50ed7001a6bcb4935e684c34882",
70
70
  "scripts": {
71
71
  "clean": "rimraf ./dist/ ./cache/ ./coverage/",
72
72
  "prebuild": "pnpm clean",
@@ -85,14 +85,15 @@
85
85
  },
86
86
  "prettier": "@webdeveric/prettier-config",
87
87
  "devDependencies": {
88
- "@commitlint/config-conventional": "^21.1.0",
89
- "@commitlint/types": "^21.1.0",
90
- "@types/node": "^24.13.2",
91
- "@typescript/native-preview": "7.0.0-dev.20260629.1",
92
- "@vitest/coverage-v8": "^4.1.9",
93
- "@webdeveric/eslint-config-ts": "^0.12.0",
88
+ "@commitlint/config-conventional": "^21.2.0",
89
+ "@commitlint/types": "^21.2.0",
90
+ "@types/node": "^24.13.3",
91
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
92
+ "@vitest/coverage-v8": "^4.1.10",
93
+ "@webdeveric/eslint-config-ts": "^0.12.1",
94
94
  "@webdeveric/prettier-config": "^0.4.0",
95
- "commitlint": "^21.1.0",
95
+ "@webdeveric/ts-data-structures": "^1.0.1",
96
+ "commitlint": "^21.2.1",
96
97
  "commitlint-plugin-cspell": "^0.9.3",
97
98
  "conventional-changelog-conventionalcommits": "^9.3.1",
98
99
  "cspell": "^10.0.1",
@@ -103,10 +104,10 @@
103
104
  "husky": "^9.1.7",
104
105
  "jsdom": "^29.1.1",
105
106
  "lint-staged": "^17.0.8",
106
- "prettier": "^3.9.3",
107
+ "prettier": "^3.9.4",
107
108
  "rimraf": "^6.1.3",
108
109
  "semantic-release": "^25.0.5",
109
- "validate-package-exports": "^1.1.1",
110
- "vitest": "^4.1.9"
110
+ "validate-package-exports": "^1.2.1",
111
+ "vitest": "^4.1.10"
111
112
  }
112
113
  }