├── .DS_Store ├── .babelrc ├── .eslintrc.json ├── .gitignore ├── LICENSE ├── README.md ├── index.js ├── package.json └── src ├── .DS_Store ├── CountryCodeList.js ├── countryCodeList.gif └── data.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalontech/ReactNativeCountryCodeList/86b668a7e7d4d33011fd59c419bd38c7eafac98f/.DS_Store -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"], 3 | "ignore": false 4 | } 5 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb", 3 | "plugins": [ 4 | "react", 5 | "jsx-a11y", 6 | "import" 7 | ] 8 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | src/countryCodeList.gif 4 | # Android/IntelliJ 5 | # 6 | build/ 7 | .idea 8 | .gradle 9 | local.properties 10 | *.iml 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Eleken 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReactNativeCountryCodeList 2 | Country code list with alphabet navigation 3 | [![npm version](http://img.shields.io/npm/v/react-native-country-code-list.svg?style=flat-square)](https://npmjs.org/package/react-native-country-code-list "View this project on npm") 4 | [![npm version](http://img.shields.io/npm/dm/react-native-country-code-list.svg?style=flat-square)](https://npmjs.org/package/react-native-country-code-list "View this project on npm") 5 | 6 | Country code list with alphabet navigation for Android/IOS to use with react-native, 7 | based on `react-native-alphabetlistview`, also using `react-native-search-box` 8 | 9 | ## Installation 10 | 1. `npm install react-native-country-code-list --save` or 11 | `yarn add react-native-country-code-list` 12 | 13 | ## Demo 14 | 15 | ![](./src/countryCodeList.gif) 16 | 17 | # Usage 18 | 19 | ```js 20 | 21 | import CountryCodeList from 'react-native-country-code-list' 22 | 23 | class CountryCodeListApp extends React.Component { 24 | render() { 25 | return ( 26 | console.log(cellObject)} 28 | /> 29 | ); 30 | } 31 | 32 | ``` 33 | 34 | ## Props 35 | All props are optional 36 | 37 | Note if you will pass custom data as a list you also must provide `renderCell`, `renderSectionHeader`, `renderSectionItem` functions and search action. 38 | 39 | | Prop | Default | Type | Description | 40 | | :------------ |:---------------:| :---------------:| :-----| 41 | | data | country code list object | `object` | Custom list data | 42 | | alphabetListProps | undefined | `object` | `react-native-alphabetlistview` props | 43 | | searchProps | undefined | `object` | `react-native-search-box` props | 44 | | onClickCell | () => {} | `func` | Callback onClick list item | 45 | | headerBackground | rgb(245, 245, 245) | `any` | background for headers and search wrapper | 46 | | cellHeight | 44.5 | `number` | Cell height | 47 | | sectionHeaderHeight | 30 | `number` | Section header height | 48 | | renderCell | func | `func` | Custom Cell component | 49 | | renderSectionItem | func | `func` | Custom Section Item (Alphabet) component | 50 | | renderSectionHeader | func | `func` | Custom Section header component | 51 | | sectionHeaderStyle | style | `any` | style section header | 52 | | sectionHeaderTextStyle | style | `any` | style section header text | 53 | | sectionItemTextStyle | style | `any` | style section item text | 54 | | cellStyle | style | `any` | style list item | 55 | | cellTitleStyle | style | `any` | style list item title | 56 | | cellLabelStyle | style | `any` | style list item right label| 57 | 58 | 59 | ## Questions or suggestions? 60 | 61 | Feel free to [open an issue](https://github.com/ElekenAgency/ReactNativeCountryCodeList/issues) 62 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import CountryCodeList from './src/CountryCodeList'; 2 | 3 | export default CountryCodeList; 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-country-code-list", 3 | "version": "1.1.2", 4 | "description": "Country code list with alphabet navigation for Android/IOS to use with react-native", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/ElekenAgency/ReactNativeCountryCodeList.git" 9 | }, 10 | "keywords": [ 11 | "react-component", 12 | "react-native", 13 | "react-native-country-code-list", 14 | "react-native-countries-code-list", 15 | "react-native-countries-code" 16 | ], 17 | "author": "Artem Kosiakevych ", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/ElekenAgency/ReactNativeCountryCodeList/issues" 21 | }, 22 | "homepage": "https://github.com/ElekenAgency/ReactNativeCountryCodeList", 23 | "scripts": { 24 | "fix": "eslint --fix", 25 | "lint": "eslint ." 26 | }, 27 | "dependencies": { 28 | "react-native-alphabetlistview": "0.3.0", 29 | "react-native-search-box": "0.0.19", 30 | "lodash": "^4.17.10" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalontech/ReactNativeCountryCodeList/86b668a7e7d4d33011fd59c419bd38c7eafac98f/src/.DS_Store -------------------------------------------------------------------------------- /src/CountryCodeList.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | View, 4 | Text, 5 | StyleSheet, 6 | TouchableOpacity, 7 | LayoutAnimation 8 | } from 'react-native'; 9 | import {getAlphabet} from './data' 10 | import AlphabetListView from 'react-native-alphabetlistview' 11 | import Search from 'react-native-search-box'; 12 | import _ from 'lodash' 13 | 14 | class CountryCodeList extends React.Component { 15 | constructor(props){ 16 | super(props) 17 | this.renderCell = this.renderCell.bind(this) 18 | this.renderSectionItem = this.renderSectionItem.bind(this) 19 | this.renderSectionHeader = this.renderSectionHeader.bind(this) 20 | 21 | this.state = { 22 | data: this.props.data ? this.props.data : getAlphabet(), 23 | query: '' 24 | } 25 | } 26 | 27 | render(){ 28 | return ( 29 | 30 | 40 | 50 | 51 | ) 52 | } 53 | 54 | filterData = _.debounce(() => { 55 | const initialData = this.props.data || getAlphabet() 56 | let data = JSON.parse(JSON.stringify(initialData)) 57 | Object.keys(data).map((key)=>{ 58 | data[key] = data[key].filter((el) => { 59 | return el.name.toLowerCase().includes(this.state.query.toLowerCase()) || el.code.includes(this.state.query) 60 | }) 61 | if (data[key].length === 0) { 62 | delete(data[key]) 63 | } 64 | }) 65 | this.setState({data}) 66 | }, 450) 67 | 68 | clearQuery = () => { 69 | this.onChangeText('') 70 | } 71 | 72 | onChangeText = (query) => { 73 | this.setState({query}) 74 | this.filterData() 75 | } 76 | 77 | renderSectionHeader(rowData){ 78 | if (this.props.renderSectionHeader) { 79 | return this.props.renderSectionHeader(rowData) 80 | } 81 | return ( 82 | 87 | {rowData.title} 88 | 89 | ) 90 | } 91 | 92 | renderSectionItem(rowData){ 93 | if (this.props.renderSectionItem) { 94 | return this.props.renderSectionItem(rowData) 95 | } 96 | return ( 97 | {rowData.title} 98 | ) 99 | } 100 | 101 | renderCell(rowData){ 102 | if (this.props.renderCell) { 103 | return this.props.renderCell(rowData) 104 | } 105 | return ( 106 | 107 | {this.props.onClickCell(rowData.item)}} 109 | style={[styles.cell, this.props.cellStyle, {height: this.props.cellHeight - 0.5}]}> 110 | {rowData.item.name} 111 | {rowData.item.code} 112 | 113 | 114 | 115 | ) 116 | } 117 | } 118 | 119 | const styles = StyleSheet.create({ 120 | container: { 121 | marginTop: 63, 122 | flex: 1 123 | }, 124 | sectionHeader: { 125 | justifyContent: 'center', 126 | top: -1, 127 | paddingLeft: 20, 128 | }, 129 | sectionHeaderText: { 130 | justifyContent: 'center', 131 | fontSize: 16, 132 | color: 'rgb(0,0,0)' 133 | }, 134 | sectionItemText: { 135 | color: 'rgb(153, 205, 55)', 136 | fontSize: 12, 137 | }, 138 | cell: { 139 | paddingLeft: 20, 140 | paddingRight: 31, 141 | flexDirection: 'row', 142 | justifyContent: 'space-between', 143 | alignItems: 'center', 144 | }, 145 | separator: { 146 | backgroundColor: 'rgb(0, 0, 0)', 147 | height: 0.5, 148 | opacity: 0.05, 149 | marginLeft: 20, 150 | marginRight: 25, 151 | }, 152 | cellTitle: { 153 | fontSize: 16, 154 | flex: 1, 155 | paddingRight: 10, 156 | color: 'rgb(0, 0, 0)', 157 | }, 158 | cellLabel: { 159 | fontSize: 16, 160 | color: 'rgb(0, 0, 0)', 161 | }, 162 | searchInput: { 163 | backgroundColor: 'white' 164 | } 165 | }); 166 | 167 | CountryCodeList.defaultProps = { 168 | headerBackground: 'rgb(245, 245, 245)', 169 | cellHeight: 44.5, 170 | sectionHeaderHeight: 30, 171 | onClickCell: () => {} 172 | }; 173 | 174 | module.exports = CountryCodeList; 175 | -------------------------------------------------------------------------------- /src/countryCodeList.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kalontech/ReactNativeCountryCodeList/86b668a7e7d4d33011fd59c419bd38c7eafac98f/src/countryCodeList.gif -------------------------------------------------------------------------------- /src/data.js: -------------------------------------------------------------------------------- 1 | export const getAlphabet = () => { 2 | let data = 3 | { A: 4 | [ { name: 'Afghanistan', code: '+93' }, 5 | { name: 'Aland Islands', code: '+358' }, 6 | { name: 'Albania', code: '+355' }, 7 | { name: 'Algeria', code: '+213' }, 8 | { name: 'AmericanSamoa', code: '+1684' }, 9 | { name: 'Andorra', code: '+376' }, 10 | { name: 'Angola', code: '+244' }, 11 | { name: 'Anguilla', code: '+1264' }, 12 | { name: 'Antarctica', code: '+672' }, 13 | { name: 'Antigua and Barbuda', code: '+1268' }, 14 | { name: 'Argentina', code: '+54' }, 15 | { name: 'Armenia', code: '+374' }, 16 | { name: 'Aruba', code: '+297' }, 17 | { name: 'Australia', code: '+61' }, 18 | { name: 'Austria', code: '+43' }, 19 | { name: 'Azerbaijan', code: '+994' } ], 20 | B: 21 | [ { name: 'Bahamas', code: '+1242' }, 22 | { name: 'Bahrain', code: '+973' }, 23 | { name: 'Bangladesh', code: '+880' }, 24 | { name: 'Barbados', code: '+1246' }, 25 | { name: 'Belarus', code: '+375' }, 26 | { name: 'Belgium', code: '+32' }, 27 | { name: 'Belize', code: '+501' }, 28 | { name: 'Benin', code: '+229' }, 29 | { name: 'Bermuda', code: '+1441' }, 30 | { name: 'Bhutan', code: '+975' }, 31 | { name: 'Bolivia, Plurinational State of', code: '+591' }, 32 | { name: 'Bosnia and Herzegovina', code: '+387' }, 33 | { name: 'Botswana', code: '+267' }, 34 | { name: 'Brazil', code: '+55' }, 35 | { name: 'British Indian Ocean Territory', code: '+246' }, 36 | { name: 'Brunei Darussalam', code: '+673' }, 37 | { name: 'Bulgaria', code: '+359' }, 38 | { name: 'Burkina Faso', code: '+226' }, 39 | { name: 'Burundi', code: '+257' } ], 40 | C: 41 | [ { name: 'Cambodia', code: '+855' }, 42 | { name: 'Cameroon', code: '+237' }, 43 | { name: 'Canada', code: '+1' }, 44 | { name: 'Cape Verde', code: '+238' }, 45 | { name: 'Cayman Islands', code: '+ 345' }, 46 | { name: 'Central African Republic', code: '+236' }, 47 | { name: 'Chad', code: '+235' }, 48 | { name: 'Chile', code: '+56' }, 49 | { name: 'China', code: '+86' }, 50 | { name: 'Christmas Island', code: '+61' }, 51 | { name: 'Cocos (Keeling) Islands', code: '+61' }, 52 | { name: 'Colombia', code: '+57' }, 53 | { name: 'Comoros', code: '+269' }, 54 | { name: 'Congo', code: '+242' }, 55 | { name: 'Congo, The Democratic Republic of the Congo', 56 | code: '+243' }, 57 | { name: 'Cook Islands', code: '+682' }, 58 | { name: 'Costa Rica', code: '+506' }, 59 | { name: 'Cote d\'Ivoire', code: '+225' }, 60 | { name: 'Croatia', code: '+385' }, 61 | { name: 'Cuba', code: '+53' }, 62 | { name: 'Cyprus', code: '+357' }, 63 | { name: 'Czech Republic', code: '+420' } ], 64 | D: 65 | [ { name: 'Denmark', code: '+45' }, 66 | { name: 'Djibouti', code: '+253' }, 67 | { name: 'Dominica', code: '+1767' }, 68 | { name: 'Dominican Republic', code: '+1849' } ], 69 | E: 70 | [ { name: 'Ecuador', code: '+593' }, 71 | { name: 'Egypt', code: '+20' }, 72 | { name: 'El Salvador', code: '+503' }, 73 | { name: 'Equatorial Guinea', code: '+240' }, 74 | { name: 'Eritrea', code: '+291' }, 75 | { name: 'Estonia', code: '+372' }, 76 | { name: 'Ethiopia', code: '+251' } ], 77 | F: 78 | [ { name: 'Falkland Islands (Malvinas)', code: '+500' }, 79 | { name: 'Faroe Islands', code: '+298' }, 80 | { name: 'Fiji', code: '+679' }, 81 | { name: 'Finland', code: '+358' }, 82 | { name: 'France', code: '+33' }, 83 | { name: 'French Guiana', code: '+594' }, 84 | { name: 'French Polynesia', code: '+689' } ], 85 | G: 86 | [ { name: 'Gabon', code: '+241' }, 87 | { name: 'Gambia', code: '+220' }, 88 | { name: 'Georgia', code: '+995' }, 89 | { name: 'Germany', code: '+49' }, 90 | { name: 'Ghana', code: '+233' }, 91 | { name: 'Gibraltar', code: '+350' }, 92 | { name: 'Greece', code: '+30' }, 93 | { name: 'Greenland', code: '+299' }, 94 | { name: 'Grenada', code: '+1473' }, 95 | { name: 'Guadeloupe', code: '+590' }, 96 | { name: 'Guam', code: '+1671' }, 97 | { name: 'Guatemala', code: '+502' }, 98 | { name: 'Guernsey', code: '+44' }, 99 | { name: 'Guinea', code: '+224' }, 100 | { name: 'Guinea-Bissau', code: '+245' }, 101 | { name: 'Guyana', code: '+595' } ], 102 | H: 103 | [ { name: 'Haiti', code: '+509' }, 104 | { name: 'Holy See (Vatican City State)', code: '+379' }, 105 | { name: 'Honduras', code: '+504' }, 106 | { name: 'Hong Kong', code: '+852' }, 107 | { name: 'Hungary', code: '+36' } ], 108 | I: 109 | [ { name: 'Iceland', code: '+354' }, 110 | { name: 'India', code: '+91' }, 111 | { name: 'Indonesia', code: '+62' }, 112 | { name: 'Iran, Islamic Republic of Persian Gulf', code: '+98' }, 113 | { name: 'Iraq', code: '+964' }, 114 | { name: 'Ireland', code: '+353' }, 115 | { name: 'Isle of Man', code: '+44' }, 116 | { name: 'Israel', code: '+972' }, 117 | { name: 'Italy', code: '+39' } ], 118 | J: 119 | [ { name: 'Jamaica', code: '+1876' }, 120 | { name: 'Japan', code: '+81' }, 121 | { name: 'Jersey', code: '+44' }, 122 | { name: 'Jordan', code: '+962' } ], 123 | K: 124 | [ { name: 'Kazakhstan', code: '+77' }, 125 | { name: 'Kenya', code: '+254' }, 126 | { name: 'Kiribati', code: '+686' }, 127 | { name: 'Korea, Democratic People\'s Republic of Korea', 128 | code: '+850' }, 129 | { name: 'Korea, Republic of South Korea', code: '+82' }, 130 | { name: 'Kuwait', code: '+965' }, 131 | { name: 'Kyrgyzstan', code: '+996' } ], 132 | L: 133 | [ { name: 'Laos', code: '+856' }, 134 | { name: 'Latvia', code: '+371' }, 135 | { name: 'Lebanon', code: '+961' }, 136 | { name: 'Lesotho', code: '+266' }, 137 | { name: 'Liberia', code: '+231' }, 138 | { name: 'Libyan Arab Jamahiriya', code: '+218' }, 139 | { name: 'Liechtenstein', code: '+423' }, 140 | { name: 'Lithuania', code: '+370' }, 141 | { name: 'Luxembourg', code: '+352' } ], 142 | M: 143 | [ { name: 'Macao', code: '+853' }, 144 | { name: 'Macedonia', code: '+389' }, 145 | { name: 'Madagascar', code: '+261' }, 146 | { name: 'Malawi', code: '+265' }, 147 | { name: 'Malaysia', code: '+60' }, 148 | { name: 'Maldives', code: '+960' }, 149 | { name: 'Mali', code: '+223' }, 150 | { name: 'Malta', code: '+356' }, 151 | { name: 'Marshall Islands', code: '+692' }, 152 | { name: 'Martinique', code: '+596' }, 153 | { name: 'Mauritania', code: '+222' }, 154 | { name: 'Mauritius', code: '+230' }, 155 | { name: 'Mayotte', code: '+262' }, 156 | { name: 'Mexico', code: '+52' }, 157 | { name: 'Micronesia, Federated States of Micronesia', 158 | code: '+691' }, 159 | { name: 'Moldova', code: '+373' }, 160 | { name: 'Monaco', code: '+377' }, 161 | { name: 'Mongolia', code: '+976' }, 162 | { name: 'Montenegro', code: '+382' }, 163 | { name: 'Montserrat', code: '+1664' }, 164 | { name: 'Morocco', code: '+212' }, 165 | { name: 'Mozambique', code: '+258' }, 166 | { name: 'Myanmar', code: '+95' } ], 167 | N: 168 | [ { name: 'Namibia', code: '+264' }, 169 | { name: 'Nauru', code: '+674' }, 170 | { name: 'Nepal', code: '+977' }, 171 | { name: 'Netherlands', code: '+31' }, 172 | { name: 'Netherlands Antilles', code: '+599' }, 173 | { name: 'New Caledonia', code: '+687' }, 174 | { name: 'New Zealand', code: '+64' }, 175 | { name: 'Nicaragua', code: '+505' }, 176 | { name: 'Niger', code: '+227' }, 177 | { name: 'Nigeria', code: '+234' }, 178 | { name: 'Niue', code: '+683' }, 179 | { name: 'Norfolk Island', code: '+672' }, 180 | { name: 'Northern Mariana Islands', code: '+1670' }, 181 | { name: 'Norway', code: '+47' } ], 182 | O: [ { name: 'Oman', code: '+968' } ], 183 | P: 184 | [ { name: 'Pakistan', code: '+92' }, 185 | { name: 'Palau', code: '+680' }, 186 | { name: 'Palestinian Territory, Occupied', code: '+970' }, 187 | { name: 'Panama', code: '+507' }, 188 | { name: 'Papua New Guinea', code: '+675' }, 189 | { name: 'Paraguay', code: '+595' }, 190 | { name: 'Peru', code: '+51' }, 191 | { name: 'Philippines', code: '+63' }, 192 | { name: 'Pitcairn', code: '+872' }, 193 | { name: 'Poland', code: '+48' }, 194 | { name: 'Portugal', code: '+351' }, 195 | { name: 'Puerto Rico', code: '+1939' } ], 196 | Q: [ { name: 'Qatar', code: '+974' } ], 197 | R: 198 | [ { name: 'Romania', code: '+40' }, 199 | { name: 'Russia', code: '+7' }, 200 | { name: 'Rwanda', code: '+250' }, 201 | { name: 'Reunion', code: '+262' } ], 202 | S: 203 | [ { name: 'Saint Barthelemy', code: '+590' }, 204 | { name: 'Saint Helena, Ascension and Tristan Da Cunha', 205 | code: '+290' }, 206 | { name: 'Saint Kitts and Nevis', code: '+1869' }, 207 | { name: 'Saint Lucia', code: '+1758' }, 208 | { name: 'Saint Martin', code: '+590' }, 209 | { name: 'Saint Pierre and Miquelon', code: '+508' }, 210 | { name: 'Saint Vincent and the Grenadines', code: '+1784' }, 211 | { name: 'Samoa', code: '+685' }, 212 | { name: 'San Marino', code: '+378' }, 213 | { name: 'Sao Tome and Principe', code: '+239' }, 214 | { name: 'Saudi Arabia', code: '+966' }, 215 | { name: 'Senegal', code: '+221' }, 216 | { name: 'Serbia', code: '+381' }, 217 | { name: 'Seychelles', code: '+248' }, 218 | { name: 'Sierra Leone', code: '+232' }, 219 | { name: 'Singapore', code: '+65' }, 220 | { name: 'Slovakia', code: '+421' }, 221 | { name: 'Slovenia', code: '+386' }, 222 | { name: 'Solomon Islands', code: '+677' }, 223 | { name: 'Somalia', code: '+252' }, 224 | { name: 'South Africa', code: '+27' }, 225 | { name: 'South Sudan', code: '+211' }, 226 | { name: 'South Georgia and the South Sandwich Islands', 227 | code: '+500' }, 228 | { name: 'Spain', code: '+34' }, 229 | { name: 'Sri Lanka', code: '+94' }, 230 | { name: 'Sudan', code: '+249' }, 231 | { name: 'Suriname', code: '+597' }, 232 | { name: 'Svalbard and Jan Mayen', code: '+47' }, 233 | { name: 'Swaziland', code: '+268' }, 234 | { name: 'Sweden', code: '+46' }, 235 | { name: 'Switzerland', code: '+41' }, 236 | { name: 'Syrian Arab Republic', code: '+963' } ], 237 | T: 238 | [ { name: 'Taiwan', code: '+886' }, 239 | { name: 'Tajikistan', code: '+992' }, 240 | { name: 'Tanzania, United Republic of Tanzania', code: '+255' }, 241 | { name: 'Thailand', code: '+66' }, 242 | { name: 'Timor-Leste', code: '+670' }, 243 | { name: 'Togo', code: '+228' }, 244 | { name: 'Tokelau', code: '+690' }, 245 | { name: 'Tonga', code: '+676' }, 246 | { name: 'Trinidad and Tobago', code: '+1868' }, 247 | { name: 'Tunisia', code: '+216' }, 248 | { name: 'Turkey', code: '+90' }, 249 | { name: 'Turkmenistan', code: '+993' }, 250 | { name: 'Turks and Caicos Islands', code: '+1649' }, 251 | { name: 'Tuvalu', code: '+688' } ], 252 | U: 253 | [ { name: 'Uganda', code: '+256' }, 254 | { name: 'Ukraine', code: '+380' }, 255 | { name: 'United Arab Emirates', code: '+971' }, 256 | { name: 'United Kingdom', code: '+44' }, 257 | { name: 'United States', code: '+1' }, 258 | { name: 'Uruguay', code: '+598' }, 259 | { name: 'Uzbekistan', code: '+998' } ], 260 | V: 261 | [ { name: 'Vanuatu', code: '+678' }, 262 | { name: 'Venezuela, Bolivarian Republic of Venezuela', 263 | code: '+58' }, 264 | { name: 'Vietnam', code: '+84' }, 265 | { name: 'Virgin Islands, British', code: '+1284' }, 266 | { name: 'Virgin Islands, U.S.', code: '+1340' } ], 267 | W: [ { name: 'Wallis and Futuna', code: '+681' } ], 268 | Y: [ { name: 'Yemen', code: '+967' } ], 269 | Z: 270 | [ { name: 'Zambia', code: '+260' }, 271 | { name: 'Zimbabwe', code: '+263' } ] } 272 | return data 273 | } 274 | --------------------------------------------------------------------------------