Skip to content

Commit f6b2a55

Browse files
committed
docs: ✏️ update the usage of native
1 parent ac7e8ef commit f6b2a55

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ countries.setLabel('VN', 'Vietnam').getLabel('VN') // 'Vietnam'
103103

104104
You may want an empty value option in the list, so here's the helper function for you. Again, it can be chained with another methods above.
105105

106-
### native()
107-
108-
You may want to display native name of countries, this is the method for you.
109-
The data source of native names can be found [here](https://annexare.github.io/Countries/)
110-
111106
#### Usage
112107
```js
113108
countries.setEmpty('Select a Country').getLabel('') // 'Select a Country'
@@ -118,7 +113,15 @@ We can even chain `setLabel` and `setEmpty` together to have list with an empty
118113
countries.setLabel('VN', 'Vietnam').setEmpty('Select a Country').getLabel('VN') // 'Vietnam'
119114
```
120115

116+
### native()
117+
118+
You may want to display native name of countries, this is the method for you.
119+
The data source of native names can be found [here](https://annexare.github.io/Countries/)
121120

121+
#### Usage
122+
```js
123+
countries.native().getLabel('TW') // 臺灣
124+
```
122125

123126

124127
## License

0 commit comments

Comments
 (0)