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

@andy922200/number-to-chinese-words

v1.0.2

Published

An npm package for number formatting to Chinese words

Downloads

1

Readme

Number To Chinese Words

將數字轉換成中文數字顯示 An npm package for number formatting to Chinese words

安裝 Installation

使用 npm/yarn/pnpm 安裝此 package:

npm install @andy922200/number-to-chinese-words
yarn add @andy922200/number-to-chinese-words
pnpm add @andy922200/number-to-chinese-words

使用方法 Usage

import { NumberToChinese } from '@andy922200/number-to-chinese-words';

const result = NumberToChinese(1234567.89);

console.log(formattedNumber); // 結果為 一百二十三萬四千五百六十七點八九

Demo

| Number 數字 | Chinese Representation 中文轉換 | | ------ | ---------------------- | | 0 | 零 | | 123 | 一百二十三 | | -123 | 負一百二十三 | | 9007199254740991 | 九千零七兆一千九百九十二億五千四百七十四萬零九百九十一 | | -9007199254740991 | 負九千零七兆一千九百九十二億五千四百七十四萬零九百九十一 | | 0.45 | 零點四五 | | 123.45 | 一百二十三點四五 | | 123.045608 | 一百二十三點零四五六零八 | | 19010100020100.01 | 十九兆零一百零一億零二萬零一百點零一 | | -0.45 | 負零點四五 | | -123.45 | 負一百二十三點四五 | | -123.045608 | 負一百二十三點零四五六零八 | | -19010100020100.01 | 負十九兆零一百零一億零二萬零一百點零一 | | 10 | 十 | | 100 | 一百 | | 1000 | 一千 | | 1000000 | 一百萬 | | 10000000 | 一千萬 | | 100000000 | 一億 | | 1000000000 | 十億 | | 10000000000 | 一百億 | | 1000000000000 | 一兆 | | 3001 | 三千零一 | | 30001 | 三萬零一 | | 3000100 | 三百萬零一百 | | 300020100 | 三億零二萬零一百 | | 3000000000000100 | 三千兆零一百 | | 3000010100000100 | 三千兆零一百零一億零一百 | | 8019010100020100 | 八千零一十九兆零一百零一億零二萬零一百 | | 8019010100022010 | 八千零一十九兆零一百零一億零二萬二千零一十 | | -3001 | 負三千零一 | | -30001 | 負三萬零一 | | -3000100 | 負三百萬零一百 | | -300020100 | 負三億零二萬零一百 | | -3000000000000100 | 負三千兆零一百 | | -3000010100000100 | 負三千兆零一百零一億零一百 | | -8019010100020100 | 負八千零一十九兆零一百零一億零二萬零一百 | | -8019010100022010 | 負八千零一十九兆零一百零一億零二萬二千零一十 |

作者 Author

Andy Lien @andy922200