Need help with chinese-random-name?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

XadillaX
210 Stars 22 Forks MIT License 34 Commits 4 Opened issues

Description

:u55b6: Generate Chinese name using Node.js.

Services available

!
?

Need anything else?

Contributors list

# 6,077
theme-c...
node
book-so...
curl
30 commits
# 65,001
JavaScr...
CSS
reactjs
nodemai...
2 commits
# 147,773
Node.js
HTML
ant
vue3
1 commit

Chinese Random Name

Generate Chinese name by using Node.js with ❤️.

Installation

$ npm --save install chinese-random-name

Usage

Generate a Full Name Automatically

Using

generate()
function:
var randomName = require("chinese-random-name");

console.log(randomName.generate());

Only Surname

Using

getOne
function in
surnames
.
console.log(randomName.surnames.getOne());

Name

Using

get
/
get1
/
get2
/
get3
function in
names
.
  • get
    : returns a random name and its length between 1 and 3.
  • get1
    : returns a random name with length 1. (you can pass a parameter which may be
    "金"
    /
    "木"
    /
    "水"
    /
    "火"
    /
    "土"
    or leave it blank)
  • get2
    : returns a random name with length 2. (you can pass
    "金金"
    /
    "金木"
    / ... or leave it blank)
  • get3
    : returns a random name with length 3. (you can pass
    "金金金"
    /
    "水火土"
    / ... or leave it blank)
  • dict
    : the dictionary object.

Examples:

randomName.names.get();
randomName.names.get1();
randomName.names.get2();
randomName.names.get3();
randomName.names.get1("金");
randomName.names.get2("木水");
randomName.names.get3("火火火");

Related Article

http://xcoder.in/2014/09/01/how-i-made-chinese-random-x/

Contribute

You're welcome to fork and make pull requests!

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.