npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wlydfe/utils

v1.2.0

Published

基础工具类库

Downloads

32

Readme

@wlydfe/utils

基础工具类库,提供常用的工具函数。

特性

  • 🚀 Tree-shaking 支持 - 基于 ES 模块,支持按需引入
  • 📦 多格式输出 - 支持 ES 格式
  • 🔧 TypeScript 支持 - 完整的类型定义
  • 🌐 浏览器兼容 - 支持现代浏览器和 Node.js
  • 📱 模块化设计 - 支持单独引入子模块

安装

npm install @wlydfe/utils
# 或
yarn add @wlydfe/utils
# 或
pnpm add @wlydfe/utils

使用方式

ES 模块(推荐)

// 完整引入
import { httpCommonParams } from '@wlydfe/utils';

// 按需引入(支持 tree-shaking)
import { httpCommonParams } from '@wlydfe/utils/http-common-params';

打包配置

本项目采用类似 lodash-es 的打包策略:

输出格式

  • ES 模块 (dist/index.js) - 主要格式,支持 tree-shaking

模块结构

dist/
├── index.js                    # ES 模块主入口
├── index.cjs.js               # CommonJS 主入口
├── index.umd.js               # UMD 格式
├── index.d.ts                 # 主入口类型定义
├── http-common-params/
│   ├── index.js               # ES 模块子模块
│   ├── index.cjs.js           # CommonJS 子模块
│   └── index.d.ts             # 子模块类型定义
└── _chunks/                   # 共享代码块

特性

  • Tree-shaking 优化 - 只打包使用到的代码
  • 多入口支持 - 支持单独引入子模块
  • 源码映射 - 提供 sourcemap 便于调试
  • 外部依赖 - 不打包第三方依赖,减小包体积

开发

# 安装依赖
pnpm install

# 开发模式
pnpm run dev

# 构建
pnpm run build

# 类型检查
pnpm run type-check

# 测试
pnpm run test

# 代码检查
pnpm run lint

构建流程

  1. 清理 - 删除旧的构建文件
  2. ES 模块构建 - 生成主要的 ES 模块文件
  3. 类型定义 - 生成 TypeScript 类型文件

依赖

  • @fingerprintjs/fingerprintjs - 浏览器指纹识别
  • md5 - MD5 哈希计算
  • uuid - UUID 生成

许可证

MIT