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

@dtgov/utils

v0.0.5

Published

数字浙江公共函数库

Readme

使用

  npm install @dtgov/utils
在main.js中
import * as szzjUtils from '@dtgov/utils'
Vue.prototype.szzjUtils = szzjUtils
在*.vue中
this.szzjUtils.addOne(21)

打包发布

// 检查仓库是否被设成了淘宝镜像库(https://registry.npm.taobao.org/)
npm config get registry

// 如果设置了淘宝镜像,执行以下命令
npm config set registry=http://registry.npmjs.org

// 先打包后发布
npm run build

// 解决问题后重新发布
npm publish

// 发布成功以后,在设会淘宝镜像
npm config set registry=https://registry.npm.taobao.org/

目录说明

|-- project
    |-- .DS_Store
    |-- .gitignore
    |-- README.md
    |-- package.json
    |-- test                  // 自动化测试
    |-- tsconfig.json
    |-- default_theme         // docs的自定义样式模板
    |-- dist                         // tsc 打包后的 js 文件 和 index.d.ts
    |-- docs                        // documentation 输出的说明文档
    |-- src                          // 函数库文件夹
        |-- .DS_Store
        |-- _README.ts         // 公共函数库总体说明文档
        |-- base.ts               // 公共函数库单个功能文件
        |-- index.ts             // 公共函数库统一暴露文件

说明

why documentation ?
1.gayhub 5000+ star 470 fork 最新提交 一个月前
2.ui好看
3.命令行一键打包生成 只要写注释,无需其他
4.支持生产md html
5.support ts 但是不支持ts js混用

一次只能生成一个版本的文档,不能多个版本切换

首页说明:_README.js 目前模板没有首页说明,为了以后方便修改首页说明,选择加前缀的方式_


生成html: documentation build src/** -f html -o docs
自定义主题: documentation build src/** -f html -o docs --theme default_theme
生成md: documentation build src/** -f md -o docs.md
为ts生成文档: documentation build src/**.ts --parse-extension ts -f html -o docs

demo

/**
 * @description 方法描述
 * @param {number} num 输入一数字
 * @returns {number} 输出该数字加一
 * @example
 * addOne(1) // 2
 */
function addOne(num:number) {
  return num + 1
}

export default addOne

语法具体参见