From ff81badb6ce24b03a286a02c2a650fa987df551c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Go=CC=88zel?= Date: Sun, 14 Apr 2024 09:32:47 +0300 Subject: [PATCH] updated readme --- README.md | 21 ++++++++++++++++++++- package.json | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e77e5d3..4c5bd9a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/package.json b/package.json index fcff0b7..fe79011 100644 --- a/package.json +++ b/package.json @@ -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": {