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

randomCaddress

v1.0.0

Published

a module of random genearate chinese address

Downloads

3

Readme

#1. Usage

##1. Install randomCaddress

npm install randomCaddress

##2. Import randomCaddress

ES6 style is supported, then get global object: randomCaddress. import randomCaddress from 'randomCaddress';

// or

var randomCaddress = require("randomCaddress.js"); or link with script in html files:

  1. Use class randomCaddress

 * 指定数量,类别
 * randomCaddress.result(number,type)
 * type现在就两种
   * 省-市-县区-街道-X幢-X室
   * 省-市-县区-街道-X单元-X室

var randomCaddressInstance = new randomCaddress();
//默认随机返回一个中文地址
randomCaddressInstance.result()

=>["四川省广元市昭化区张家乡4幢229室"]
// 指定type(0,1) 生成10个数据

randomCaddressInstance.result(10,1)

=>
0:"河北省邢台市隆尧县莲子镇镇7单元56室"
1:"广西壮族自治区柳州市柳南区柳石街道19单元237室"
2:"青海省西宁市城北区马坊街道13单元273室"
3:"湖南省益阳市沅江市阳罗洲镇16单元181室"
4:"山东省东营市东营区辛店街道8单元121室"
5:"河北省邢台市市辖区18单元171室"
6:"江西省抚州市金溪县浒湾镇19单元61室"
7:"江苏省南通市启东市启隆乡3单元144室"
8:"吉林省长春市农安县伏龙泉镇8单元270室"
9:"上海市上海市长宁区程家桥街道1单元116室"