UNPKG

@jakguru/phone-object

Version:

An immutable data structure representing a specific phone number and accompanying methods. It contains class and instance methods of creating, parsing, validating, and formatting phone numbers. Based on google-libphonenumber, which is in turn based on Goo

12 lines (10 loc) 433 B
import { test } from '@japa/runner' import { allCountries } from 'country-telephone-data' import { isos } from '../src/countries' test.group('countries', () => { test('country lists match', ({ assert }) => { const countrySet = new Set(allCountries.map((c) => c.iso2.trim().toUpperCase())) assert.isTrue(isos.size === countrySet.size) isos.forEach((iso) => assert.isTrue(countrySet.has(iso), `missing ${iso}`)) }) })