8000 GitHub - marandino/tz-country-code: Utility that converts the user's timezone into their country code for localization purposes.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

marandino/tz-country-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@marandino/tz-country-code

Automatically detect a user's country based on their timezone, providing an easy and efficient way to get location information without relying on IP addresses.

Installation

npm install @marandino/tz-country-code

or

yarn add @marandino/tz-country-code

Usage

import { getCountryCode } from "@marandino/tz-country-code";

// Get the country code (e.g., 'US')
const countryCode = getCountryCode("code");
console.log(countryCode);

// Get the country name (e.g., 'United States')
const countryName = getCountryCode("name");
console.log(countryName);

License

MIT

About

Utility that converts the user's timezone into their country code for localization purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0