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

@yqg/beetle

v1.0.7

Published

Beetle is a toolkit for building web applications with Vue 3, TypeScript, and Vite. It provides a set of utilities and components to streamline development and improve performance.

Readme

什么是 beetle

beetle 是一款现代化的前端函数工具库,旨在提升日常开发效率与项目一致性。它不仅内置了完整的 lodash-es 工具集,还结合了实际业务场景,集成多种高频使用的函数方法,帮助团队在高质量代码开发中减少重复造轮子。

特性

beetle 主要具备以下特性:

  • 🧰 内置 lodash-es 全量功能
    开箱即用的 lodash-es 方法集合,涵盖常见的数据处理、数组操作、对象转换等能力,满足绝大多数业务开发场景。

  • ⚙️ 融合业务场景的定制函数
    集成多个结合公司业务特点封装的高频函数,提升复用率,统一项目函数风格,减少重复工作。

  • 🌲 支持按需加载与 Tree Shaking
    所有函数均可按需引入,自动支持 Tree Shaking,避免冗余打包,助力前端性能优化。

  • 💡 良好的开发体验
    统一的函数命名规范、丰富的类型提示与完善的单元测试,助你快速上手、放心使用。

适用场景

beetle 适用于所有现代前端项目,尤其适合:

  • 需要处理数组、对象、字符串数据的业务场景
  • 对函数复用、开发一致性有较高要求的团队
  • 希望减少工具函数重复封装、避免工具库混乱的项目

使用文档

使用文档

文档构建

step1. 从master切release分支如: release/beetle_20250604 setp2. cicd 发布 ci地址 MODULE_NAME 选择 cn-web-yqg-beetle BUILD_ENV 选择:prod,最后点击确认 cd地址 BUILD_ENV 选择:prod 镜像选择要不输的版本,最后点击确认。

开发指南

# install dependencies
$ pnpm install

# start dev server
$ pnpm dev

# 启动文档站点
$ pnpm doc:dev

# 打包工具库函数
$ pnpm build

安装

# 安装 @yqg/beetle
npm install @yqg/beetle
# 或者使用 yarn
yarn add @yqg/beetle
# 或者使用 pnpm
pnpm add @yqg/beetle

类型定义说明

  • TypeScript 项目@types/lodash-es 已包含在 @yqg/beetle 的依赖中,安装 @yqg/beetle 时会自动安装,无需单独安装。可以直接使用所有 lodash 方法并获得完整的类型推断(如 debouncethrottlecloneDeep 等)。
  • JavaScript 项目:虽然 @types/lodash-es 会被安装,但不会影响运行时功能,可以直接使用所有 lodash 方法。

使用

// 按需引入(支持 Tree Shaking)
// 内置lodash-es 全量方法
import { cloneDeep, add } from '@yqg/beetle';
cloneDeep({});
console.log(add(1, 2));// 3

// 按需引入(支持 Tree Shaking)
// 自有函数
import { arrayToTree } from '@yqg/beetle';
arrayToTree([], { idKey: 'id', parentIdKey: 'parentId', childrenKey: 'children' });

// 全量引入 (会打包全部工具)
import b from '@yqg/beetle'
b.arrayToTree([], { idKey: 'id', parentIdKey: 'parentId', childrenKey: 'children' });
b.cloneDeep({});

问题反馈

在使用过程中发现任何问题、或者有改善建议,欢迎在 GitLub Issues 进行反馈:https://gitlab.yangqianguan.com/web/yqg-beetle/-/issues