Skip to content

点滴生活记录个人成长

记录个人成长

VitePress

NPM包

@dhlx/resolver

resolver 是一个强大的 TypeScript 工具函数,用于处理异步函数的执行结果,统一进行错误处理和结果包装,让您的异步代码更加简洁和可靠。

@dhlx/delay

delay 函数是一个用于实现延迟功能的实用工具函数。它接受一个以毫秒为单位的时间参数,并返回一个 Promise,在指定的时间过后成功解决

@dhlx/async-pool

一个轻量级的 JavaScript 异步任务并发控制工具。它允许你限制同时运行的异步任务数量,确保在同一时间只执行指定数量的任务。

@dhlx/format-size-units

A utility function to format file sizes from kilobytes (KB) to larger units like megabytes (MB), gigabytes (GB), terabytes (TB), and petabytes (PB).

@dhlx/dhlx-cli

dhlx 脚本

@dhlx/async-compose

AsyncCompose 是一个轻量的中间件组合器,适用于处理异步操作链。它允许你将多个中间件函数串联在一起,形成类似“洋葱模型”的执行顺序。此工具非常适合在 Koa、Express 等框架之外实现自定义中间件逻辑或其他需要异步控制流的场景。

@dhlx/virtual-scrolling

vue3 虚拟滚动

@dhlx/event-target

A lightweight TypeScript implementation of the EventTarget interface, supporting event listeners, event bubbling, and propagation control, designed for custom event-driven systems.

@dhlx/signal

A lightweight reactive data library providing Signal and Computed objects for state management and automatic updates, tracking dependencies and simplifying data handling.

@dhlx/text-template

The `template` function is a customizable templating engine that takes a string with embedded template expressions, parses it, and returns a function that can render the template with dynamic data.

@dhlx/diff-json

diffJson is a utility for comparing two JSON objects and generating a detailed list of changes (additions, deletions, modifications). It supports nested objects and arrays, and allows you to configure which paths to include or exclude from the comparison.

@dhlx/red-black-tree

这是一个用 TypeScript 实现的红黑树 (RBTree) 和基于红黑树的树映射 (TreeMap) 的 npm 包。该实现提供了高效的插入、删除、搜索操作,并支持键值对存储。

@dhlx/types

typescript 工具类型

@dhlx/uni-vite-static-proxy

uni-app Enable local static file server with proxy forwarding

@dhlx/event-emitter

A simple event emitter for TypeScript.

@dhlx/rwlock-shared

A simple implementation of a read-write lock with shared read

@dhlx/cookie

轻量级浏览器 Cookie 操作工具库,提供类型安全的 Cookie 设置、获取和删除功能

Demo展示

FLIP动画实现演示

FLIP动画是一种高性能的Web动画技术,它通过记录元素的初始和最终位置,然后应用反向变换来创建流畅的动画效果。这种技术特别适合处理布局变化时的元素动画。

flip动画

History API 单页应用功能说明

这个示例展示了如何使用History API创建单页应用(SPA),主要特点包括:

浏览器路由

Rust + WebAssembly 图像处理示例

本示例演示如何使用Rust开发WebAssembly模块,实现浏览器端的图像处理功能。项目包含灰度转换、颜色反转、棕褐色调等常见滤镜,并支持在Web Worker中异步执行。:

计算

模块