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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lidashi-tools

v1.4.0

Published

Javascript常用的小工具

Downloads

22

Readme

LIDASHITools

添加了19中常用的工具方法和边界处理

详细参数和返回值见注释

包括以下方法

1.transformYuan2Fen

作用:将数字或字符串表示的人民币单位元转化为分

2.transformFen2Yuan

作用:将整数或字符串表示的人民币单位分转化为元

3.randomString

作用:生成一个指定长度、且不与指定数组中其他字符串相同的的随机字符串

4.string2FullWidth

作用:将字符串中的全角字符全部替换为半角

5.string2HalfWidth

作用:将字符串中的半角字符全部替换为全角

6.queryParams

作用:获取URL中的查询参数

7.maxOfArray

作用:获取一个数字数组中的最大值

8.minOfArray

作用:获取一个数字数组中的最小值

9.exploreInfo

作用:获取当前浏览器的名称和编号

10.exploreDetailsInformation

作用:获取当前浏览器的详细信息

11.isValidateIDNumber

作用:判断一个身份证号是否合法

12.isValidateEmail

作用:判断一个邮箱地址是否合法

13.isValidatePhoneNumber

作用:判断一个手机号码是否合法

14.justLeftNumber

作用:去掉一个字符串或数组中的其他字符,只保留数字

15.justLeftCN

作用:去掉一个字符串或数组中的其他字符,只保留中文

16.removeFromArray

作用:移除数组中的指定元素

17.transformNumber2CN

作用:将金额的数字转为汉字形式的数字表示方法