diff --git a/demos/vite/package.json b/demos/vite/package.json index b4e35eb..94e859a 100644 --- a/demos/vite/package.json +++ b/demos/vite/package.json @@ -8,7 +8,7 @@ "preview": "vite preview" }, "dependencies": { - "vue": "^3.4.21" + "vue": "^3.4.21" }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", diff --git a/package.json b/package.json index 79a7d44..efa32b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.18.4", + "version": "0.18.5", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick", @@ -65,15 +65,15 @@ "watch": "nr build -- --watch src" }, "devDependencies": { - "@antfu/eslint-config": "^2.8.3", + "@antfu/eslint-config": "^2.9.0", "@antfu/ni": "^0.21.12", - "@types/node": "^20.11.28", + "@types/node": "^20.11.30", "@vitest/coverage-v8": "^1.4.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", "tsup": "^8.0.2", - "typescript": "^5.4.2", - "vite": "^5.1.6", + "typescript": "^5.4.3", + "vite": "^5.2.6", "vitest": "^1.4.0" } } diff --git a/src/common/data/object.ts b/src/common/data/object.ts index cc3cdec..ff68096 100644 --- a/src/common/data/object.ts +++ b/src/common/data/object.ts @@ -1,4 +1,4 @@ -import { isArray, isBinaryArray, isFunction, isObject, isPrimitive, isSymbol } from './is' +import { isArray, isBinaryArray, isObject, isPrimitive, isSymbol } from './is' /** Like `.map()` for object. Return new key and value or `undefined` to delete. */ export function objectMap( @@ -112,16 +112,16 @@ export function objectPlain(obj: any, opt?: { .map(o => handleObject(o, depth + 1)) } - if (isObject(obj) || isFunction(obj)) { - const nobj: any = {} - for (const [key, value] of Object.entries(obj)) { - if (filter(value)) - nobj[key] = handleObject(value, depth + 1) - } - return nobj + // if (isObject(obj) || isFunction(obj)) { + const nobj: any = {} + for (const [key, value] of Object.entries(obj)) { + if (filter(value)) + nobj[key] = handleObject(value, depth + 1) } + return nobj + // } - return undefined + // return undefined } return handleObject(obj, 0) diff --git a/src/common/msg/emitter.ts b/src/common/msg/emitter.ts index 42e0d5e..ec9d70d 100644 --- a/src/common/msg/emitter.ts +++ b/src/common/msg/emitter.ts @@ -48,7 +48,7 @@ export class Emitter< /** * Emits an event to all subscribers and executes their corresponding event handlers. - * + * * @param event - The event to emit. * @param args - The arguments to pass to the event handlers. * @returns A promise that resolves to a boolean indicating whether the event was successfully emitted. diff --git a/src/common/network.spec.ts b/src/common/network.spec.ts index 11aba30..73fd421 100644 --- a/src/common/network.spec.ts +++ b/src/common/network.spec.ts @@ -1,4 +1,4 @@ -import { fetchJson, fetchText, parseBasicAuth } from './network' +import { fetchText, parseBasicAuth } from './network' describe('network', () => { it('should fetch', async () => { diff --git a/src/common/time.ts b/src/common/time.ts index 475369d..3b637ca 100644 --- a/src/common/time.ts +++ b/src/common/time.ts @@ -12,7 +12,7 @@ export function formatMilliseconds(ms: number): string { /** * Parses the given date candidates and returns the first valid Date object found. - * + * * @param dateCandidates - The date candidates to parse, which can be either strings or Date objects. * @returns The parsed Date object, or undefined if no valid date is found. */