Skip to content

Commit

Permalink
docs: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lichdkimba committed Sep 28, 2022
1 parent b95bb6a commit 8e65a6c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,16 @@ let name = new Name({
}).Name
console.log(name)
```

# Credit (Data Sources)
## Chinese Names
https://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9B%BD%E5%A7%93%E6%B0%8F%E6%8E%92%E5%90%8D
https://github.com/wainshine/Chinese-Names-Corpus

## English Names
https://web.archive.org/web/20081209221654if_/http://www.census.gov:80/genealogy/www/Top1000.xls
https://www.ssa.gov/cgi-bin/popularnames.cgi

## Japanese Names
https://myoji-yurai.net/prefectureRanking.htm?prefecture=%E5%85%A8%E5%9B%BD&page=0
https://github.com/willnet/gimei
4 changes: 2 additions & 2 deletions src/NameMain/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const GetFromRandomArray = (array: [string, number][]):string => {
export const GetFromRandomArray = (array: [string, number][]): string => {
let temp_max: number = array[array.length - 1][1]
temp_max = Math.random() * temp_max
let result = ''
Expand All @@ -12,7 +12,7 @@ export const GetFromRandomArray = (array: [string, number][]):string => {
return result
}

export const GetFromNormalArray = (array: string[]):string => {
export const GetFromNormalArray = (array: string[]): string => {
let temp_max: number = array.length - 1
temp_max = Math.floor(Math.random() * temp_max)
return array[temp_max]
Expand Down

0 comments on commit 8e65a6c

Please sign in to comment.