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

test-wuyve-npm

v2.1.3

Published

基础npm包

Downloads

0

Readme

测试发布一个NPM包

发布流程:

  1. 初始化项目 npm init
  2. 安装依赖包 npm install
  3. 新建dist、src项目文件,编写代码
  4. 编写好之后,打包 npm run build
  5. package.json 里的 main 字段指向 dist 里的 js 文件
  6. 新建 .npmignore 文件,可以把不需要发布的文件忽略,如果只有 .gitignore,没有 .npmignore,则会使用 .gitignore
  7. 登录 npm login ,输入账号、密码、邮箱
  8. 发布 npm publish

使用流程

  1. 在项目中安装此NPM包 npm install test-wuyve-npm --save
import {randomArr} from 'test-wuyve-npm'

console.log(randomArr([1, 2, 3]))
  1. 升级NPM包 卸载已有NPM npm uninstall test-wuyve-npm 更新NPMnpm install test-wuyve-npm --save

方法

randomArr

  • 描述:返回随机数组
  • 入参:数组
  • 出参:随机后的数组

randomNum

  • 描述:返回随机数字
  • 入参:最小值,最大值,小数点位数
  • 出参:返回最小值和最大值之间的n位小数的随机数

getUrlParam

  • 描述:返回URI参数
  • 入参:
  • 出参:

getParamType,

  • 描述:返回数据类型
  • 入参:
  • 出参:

deepClone,

  • 描述:深拷贝
  • 入参:
  • 出参:

formatNum,

  • 描述:数值千分位
  • 入参:
  • 出参:

uniqArr,

  • 描述:数组去重
  • 入参:
  • 出参:

uniqArrObj,

  • 描述:数组对象去重
  • 入参:
  • 出参:

throttle

  • 描述:节流
  • 入参:
  • 出参: