Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
muratgozel committed Apr 14, 2024
1 parent e78b943 commit ff81bad
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Here are the methods that you can use to interact with the data:
```js
import {isCountryCode, findCountry, findCallingCode, findCountryLanguages,
isCurrencyCode, findCurrency, isLanguageCode, findLanguage,
findCountryTimezones, findTimezoneOffset} from 'locale-util'
findCountryTimezones, findTimezoneOffset, findTerritories, findCountryTerritory
} from 'locale-util'

isCountryCode('TR') // true
isCountryCode('XX') // false
Expand Down Expand Up @@ -81,6 +82,24 @@ findCountryTimezones('TT') /*

findTimezoneOffset('America/Puerto_Rico') // 240
findTimezoneOffset('Europe/Istanbul') // -180

findTerritories() /*
[
{
"code": "005",
"name": "South America"
},
{
"code": "011",
"name": "Western Africa"
},
...
...
]
*/

findCountryTerritory('TR') // { code: '145', name: 'Western Asia' }
findCountryTerritory('TR') // { code: '021', name: 'Northern America' }
```

Have a look at the tests, types and source for more info.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "locale-util",
"version": "4.2.0",
"version": "4.2.1",
"description": "Locale data generators written in node.js. Uses reliable sources. Generated data available as JS/JSON objects.",
"type": "module",
"exports": {
Expand Down

0 comments on commit ff81bad

Please sign in to comment.