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

nupp

v1.0.1

Published

一款由 typescript 编写的 数字转(汉字/大写)的 js 工具库

Downloads

17

Readme

nupp

一款由 typescript 编写的 数字转(汉字/大写)的 js 工具库

安装

npm

npm i nupp -s

pnpm

pnpm i nupp -s

yarn

yarn add nupp

仓库地址

npm 地址

使用案例

可点击 此处 中的 example/src/main.js 进行查看

Option

属性

| 属性名 | 类型 | 描述 | 默认值 | |--|--|--|--| | type | sumcapitalcharacter | 类型。sum: 金额,若 存在连续多个 0 ,将被忽略,如:1001 -> 一零一,注:若 传递的浮点数长度超过 2 位,将被忽略并不会返回超过的内容;capital: 大写数字,若 传入数值为 浮点数(3.14) ,整数部分和小数部分将以 ',' 分割; character: 汉字,若 传入数值为 浮点数(3.14) ,整数部分和小数部分将以 ',' 分割。 | character | | unit | boolean | 当为 true 时将携带单位;仅 type = sum 时有效,若传递的 数据为 浮点数 将携带 角、分单位 | true | | sumCapital | boolean | 开启大写转换,仅 type = sum 时有效。sumCapital = true 金额将会转成 大写汉字;sumCapital = false 金额将会转成 汉字,不会进行大写转换 | true | | maxNumber | number | 最大限制 | 999999999999 | | minNumber | number | 最小限制 | 0 |

浏览器支持情况

| chrome | edge | firefox | opera | safari | |--|--|--|--|--| | 53+ | 79+ | 63+ | 40+ | 10+ |