
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
locale-enum
Advanced tools
A TypeScript enum containing all locales, such as en-US
or zh-Hant-HK
. Uses
mixed-case strings for locales (en-US
, not en-us
). Contains 495 locales.
npm i --save locale-enum
const Locale = require('locale-enum');
console.log(Locale.en_US); // "en-US"
Import using import
:
import { Locale } from 'locale-enum';
console.log(Locale.fr_FR); // "fr-FR"
You can use this in JavaScript too, this is especially handy if your IDE supports code completion.
const { Locale } = require('locale-enum');
console.log(Locale.pt_BR); // "pt-BR"
Note: the enum keys use underscores, while string values use dashes.
Pull requests and comments are welcome at the GitHub repo.
1.1.1 ##
FAQs
A TypeScript enum of all locales, such as "en-US".
The npm package locale-enum receives a total of 13,263 weekly downloads. As such, locale-enum popularity was classified as popular.
We found that locale-enum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.