Sv443 1 тиждень тому
батько
коміт
dc485d95ee
6 змінених файлів з 18 додано та 6 видалено
  1. 1 1
      docs.md
  2. 4 4
      lib/Mixins.ts
  3. 0 0
      lib/error.ts
  4. 2 1
      lib/index.ts
  5. 1 0
      package.json
  6. 10 0
      pnpm-lock.yaml

+ 1 - 1
docs.md

@@ -2335,7 +2335,7 @@ Returns an array of all registered listener functions.
 
 <br>
 
-#### `Debouncer.setTimeout()`  
+#### `Debouncer.setTimeout()`
 Signature: `setTimeout(timeout: number): void`  
 Changes the timeout for the debouncer.
 

+ 4 - 4
lib/Mixins.ts

@@ -5,7 +5,7 @@
 
 /* eslint-disable @typescript-eslint/no-explicit-any */
 
-import { purifyObj, type Prettify } from "@sv443-network/coreutils";
+import { pureObj, type Prettify } from "@sv443-network/coreutils";
 
 /** Full mixin object (either sync or async), as it is stored in the instance's mixin array. */
 export type MixinObj<TArg, TCtx> = Prettify<
@@ -121,7 +121,7 @@ export class Mixins<
    * @param config Configuration object to customize the behavior.
    */
   constructor(config: Partial<MixinsConstructorConfig> = {}) {
-    this.defaultMixinCfg = purifyObj({
+    this.defaultMixinCfg = pureObj({
       priority: config.defaultPriority ?? 0,
       stopPropagation: config.defaultStopPropagation ?? false,
       signal: config.defaultSignal,
@@ -146,10 +146,10 @@ export class Mixins<
   >(
     mixinKey: TKey,
     mixinFn: (arg: TArg, ...ctx: TCtx extends undefined ? [void] : [TCtx]) => ReturnType<TMixinMap[TKey]> extends Promise<any> ? ReturnType<TMixinMap[TKey]> | Awaited<ReturnType<TMixinMap[TKey]>> : ReturnType<TMixinMap[TKey]>,
-    config: Partial<MixinConfig> | number = purifyObj({}),
+    config: Partial<MixinConfig> | number = pureObj({}),
   ): () => void {
     const calcPrio = typeof config === "number" ? config : this.calcPriority(mixinKey, config);
-    const mixin = purifyObj({
+    const mixin = pureObj({
       ...this.defaultMixinCfg,
       key: mixinKey as string,
       fn: mixinFn,

+ 0 - 0
lib/errors.ts → lib/error.ts


+ 2 - 1
lib/index.ts

@@ -5,6 +5,7 @@
 
 export * from "./Dialog.js";
 export * from "./dom.js";
-export * from "./errors.js";
+export * from "./error.js";
 export * from "./Mixins.js";
 export * from "./SelectorObserver.js";
+export * from "@sv443-network/coreutils";

+ 1 - 0
package.json

@@ -58,6 +58,7 @@
   },
   "homepage": "https://github.com/Sv443-Network/UserUtils",
   "dependencies": {
+    "@sv443-network/coreutils": "0.0.1",
     "nanoevents": "^9.1.0"
   },
   "devDependencies": {

+ 10 - 0
pnpm-lock.yaml

@@ -8,6 +8,9 @@ importers:
 
   .:
     dependencies:
+      '@sv443-network/coreutils':
+        specifier: 0.0.1
+        version: 0.0.1
       nanoevents:
         specifier: ^9.1.0
         version: 9.1.0
@@ -848,6 +851,9 @@ packages:
     cpu: [x64]
     os: [win32]
 
+  '@sv443-network/[email protected]':
+    resolution: {integrity: sha512-3GHjpr56ui84KQW8IQh4YvBQYkrUVJPnu8vaY3is9l4uAFFgSfn3hxBvZgbkbr5Oj/U9HgiKNVDjJ8JULPwivA==}
+
   '@testing-library/[email protected]':
     resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==}
     engines: {node: '>=18'}
@@ -3078,6 +3084,10 @@ snapshots:
   '@rollup/[email protected]':
     optional: true
 
+  '@sv443-network/[email protected]':
+    dependencies:
+      nanoevents: 9.1.0
+
   '@testing-library/[email protected]':
     dependencies:
       '@babel/code-frame': 7.26.2