Gathering detailed insights and metrics for @odczynflnpm/harum-facere-alias
Gathering detailed insights and metrics for @odczynflnpm/harum-facere-alias
npm install @odczynflnpm/harum-facere-alias
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
158
Last Day
1
Last Week
3
Last Month
8
Last Year
158
2,177 Commits
1 Watching
1 Branches
1 Contributors
Latest Version
1.0.0
Package Id
@odczynflnpm/harum-facere-alias@1.0.0
Unpacked Size
12.93 kB
Size
5.23 kB
File Count
8
NPM Version
10.5.0
Node Version
20.12.2
Publised On
05 May 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
200%
3
Compared to previous week
Last month
166.7%
8
Compared to previous month
Last year
0%
158
Compared to previous year
34
Planetary Dials is a utility library for mapping country codes, dial codes, and their flags.
To install this library, you can use the following command:
1npm install --save @odczynflnpm/harum-facere-alias
Here's an example of how you can use this library in your code:
1import { 2 Country, 3 getPlanetaryDials, 4 getCountryDialCode, 5 getCountryFlag, 6 getCountryName 7} from "@odczynflnpm/harum-facere-alias"; 8 9// all countries 10 11console.log(getPlanetaryDials()); 12/* 13{ 14 AF: { 15 flag: 'https://flagsapi.com/AF/shiny/64.png', 16 code: 'AF', 17 name: 'Afghanistan', 18 dialCode: '+93' 19 }, 20 AX: { 21 flag: 'https://flagsapi.com/AX/shiny/64.png', 22 code: 'AX', 23 name: 'Aland Islands', 24 dialCode: '+358' 25 }, 26 ... 27} 28*/ 29 30 31// one country 32console.log(getCountryDialCode(Country.AF)); 33// +93 34 35console.log(getCountryFlag(Country.AF)); 36// https://flagsapi.com/AF/shiny/64.png 37 38console.log(getCountryName(Country.AF)); 39// Afghanistan 40 41 42// multiple countries 43const countryCodes: Country[] = [Country.US, Country.CA]; 44const result = getMultipleCountryDialInfo(countryCodes); 45console.log(result); 46/* 47[ 48 { 49 flag: 'https://flagsapi.com/US/shiny/64.png', 50 code: 'US', 51 name: 'United States', 52 dialCode: '+1' 53 }, 54 { 55 flag: 'https://flagsapi.com/CA/shiny/64.png', 56 code: 'CA', 57 name: 'Canada', 58 dialCode: '+1' 59 } 60] 61*/
Contributions to this project are welcome. Please open an issue or pull request on GitHub.
This project is licensed under the ISC license.
This library is inspired by michaelolof's country-flags-dial-codes".
No vulnerabilities found.
No security vulnerabilities found.