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 🙏

© 2025 – Pkg Stats / Ryan Hefner

workone

v1.0.3

Published

reg,js

Downloads

1

Readme

trim

功能 :去空格

参数(字符串,类型)

 类型为 1:全部替换
 类型为 2:前后空格
 类型为 3:前空格
 类型为 4:后空格

changeCase

功能 :切换大小写

参数(字符串,类型)

类型为 1:首字母大写
类型为 2:首字母小写
类型为 3:大小写替换
类型为 4:全部大写
类型为 5:全部小写

repeatStr

功能 :字符串复制

参数(字符串,复制个数)

replaceAll

功能 :字符串替换

参数(字符串,被替换项,替换项)

replaceStr

功能 :字符串替换

参数 (字符串,字符格式, 替换方式,替换的字符(默认*))

替换方式 :
0 : 正序
1 : 倒序

checkType

功能 :检测字符串类型

参数 (字符串,类型)

类型为 phone:匹配手机号
类型为 email:匹配email
类型为 number:匹配数字
类型为 english:匹配英文字母
类型为 chinese:匹配中文     
类型为 upper:匹配大写字母
类型为 lower:匹配小写字母

checkPwd

功能 :检测密码强度

参数 (密码)

返回值为 0:小于6位数(统一返回0)
返回值为 1:全部为数字 
返回值为 2:数字加小写字母 
返回值为 3:数字+小写字母+大写字母   

randomWord

功能 :随机码

参数 (字符串,2-36之间的整数)

strSplit

功能 :查找字符串

参数 (字符串,查找的字符)

formatText

功能 :格式化字符串

参数 ( 字符串 分割个数 分隔符)

longestWord

功能 :查找最长单词

参数 (字符串,分隔符)

titleCaseUp

功能 :首字母大写

参数 (字符串)

randomWord

功能 :随机码

参数 (字符串,2-36之间的整数)