Skip to content

Commit

Permalink
✨ V2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
sambatlim committed Aug 31, 2020
1 parent a06fd91 commit 686ca89
Show file tree
Hide file tree
Showing 18 changed files with 383 additions and 322,898 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@

This package is able to generate real khmer name in khmer alphabets(Unicode range: U+1780–U+17FF Khmer; U+19E0–U+19FF Khmer Symbols) and cambodia province name with city including Lat Long (update 2020) **[Working demo](https://sambatlim.github.io/khmer-name-generator/)**.

### What new in version2 ?
1. add more khmer full name and first name.
2. add sentence generator (lorem ipsum).
3. add day and month generator.

## Getting Started

### Prerequisites
### Prerequisites(If you want to install with nodejs)
This project require node install.

```
Expand All @@ -17,14 +22,22 @@ node --version
```

### Installing and usage
Install in the browser
Install in the browser (no need node.js)
```
<script src="./dist/khmernamegenerator.min.js" type="text/javascript"></script>
<script>
console.log(khmerNameGenerator.name.getRandomName());
console.log(khmerNameGenerator.name.getRandomFirstname());
console.log(khmerNameGenerator.name.getRandomLastname());
console.log(khmerNameGenerator.provincewithlatlong.getProvinceWithLatLong());
console.log(khmerNameGenerator.khmerDate.getKhmerMonth());
console.log(khmerNameGenerator.khmerDate.getKhmerDay());
let numberOfWords = 10;
khmerNameGenerator.generateWord.generateSentence(numberOfWords).then(generatedSentence => console.log(generatedSentence))
</script>
```

Expand Down Expand Up @@ -56,6 +69,22 @@ get the khmer province with lat long
```
var khmerProvinceWithLatLong = khmerGenerator.provincewithlatlong.getProvinceWithLatLong()
```
get the khmer date
```
var day = khmerGenerator.khmerDate.getKhmerDay();
var month = khmerGenerator.khmerDate.getKhmerMonth();
```

generate sentence
```
let numberOfWords = 10;
khmerGenerator.generateWord.generateSentence(numberOfWords).then(generatedSentence => console.log(generatedSentence));
//use with async function
async function generateSentence(){
let generatedSentence = await khmerGenerator.generateWord.generateSentence(numberOfWords);
}
```

## Authors

Expand Down
2 changes: 1 addition & 1 deletion dist/khmernamegenerator.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 686ca89

Please sign in to comment.