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

billd-utils

v1.0.3

Published

billd's utils

Readme

简介

积累常用的 js 方法

安装

npm install billd-utils

文档

https://project.hsslive.cn/billd-monorepo/modules/utils.html

使用

该库尚未发布 1.0 版本,api 可能会随时发生变化,请勿用于生产环境!

import { isBrowser } from 'billd-utils';

console.log(isBrowser());

在浏览器使用

该库尚未发布 1.0 版本,api 可能会随时发生变化,请勿用于生产环境!

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      http-equiv="X-UA-Compatible"
      content="IE=edge"
    />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <title>Document</title>
  </head>
  <body>
    <script src="https://unpkg.com/billd-utils/index.min.js"></script>
    <script>
      console.log(BilldUtils.isBrowser());
    </script>
  </body>
</html>

VSCode 提示

新建一个.d.ts 文件,如:billd-utils.d.ts(或者使用项目原有的.d.ts 文件),添加以下代码:

declare global {
  // eslint-disable-next-line
  import utils from 'billd-utils';
}

然后 vscode 里输入 billd-uitls 的方法,如 isBrowser,vscode 就会提示是否从 billd-utils 导入 isBrowser了~

本地调试

本地调试不会构建 umd

pnpm run dev

本地构建

pnpm run build

生成文档

使用 typedoc 生成,文档会生成在项目根目录的 doc 目录

pnpm run doc

发版

0.确保 git 工作区干净

即确保本地的修改已全部提交(git status 的时候会显示:nothing to commit, working tree clean ),否则会导致执行 release:local 脚本失败

1.执行本地发版脚本

pnpm run release:local

该脚本内部会做以下事情:

  1. 根据用户选择的版本,更新 package.json 的 version
  2. 开始构建
  3. 对比当前版本与上个版本的差异,生成 changelog
  4. 提交暂存区到本地仓库:git commit -m 'chore(release): v 当前版本'
  5. 生成当前版本 tag:git tag v 当前版本

2.执行线上发版脚本

pnpm run release:online

该脚本内部会做以下事情:

  1. 提交当前版本:git push
  2. 提交当前版本 tag:git push origin v 当前版本
  3. 发布到 npm

源码

https://github.com/galaxy-s10/billd-utils