probably-china
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

probably-china

A lucky guess that we are probably in China or facing a Chinese user.

This is a simple package for the browser environment that makes a quick guess to see if the current webpage is running in China, or if the user is from China, based on the available browser info. It currently uses two strategies:

  1. Check if the current browser favors simplified Chinese or related languages.
  2. Check if the current timezone is one of the Chinese timezones.

The use case for this package is not to avoid showing information that are sensitive in China.

Readme

Keywords

Package Sidebar

Install

npm i probably-china

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.75 kB

Total Files

5

Last publish

Collaborators

  • mutsuntsai