Skip to content

Introduction

NexLib is a lightweight TypeScript/JavaScript utility library for web apps.

  • 时间与日期:formatnowSecondsformatDuration
  • URL 工具:主域名、查询参数、同源判断、路径/端口
  • HTTP 助手:retry/timeout/withQuery/toFormData
  • 校验工具:邮箱、URL、手机号、日期、邮编、身份证
  • 字符串/对象:驼峰化、省略、深合并、分组、去重
  • 存储:Local/Session、TTL 过期、Cookie
  • 彩色日志:在控制台更易读

特点:零运行时依赖、完整类型、可 Tree‑shaking、浏览器与 Node 友好。

Released under the ISC License.