Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
iso-lang-codes
Advanced tools
Node util for ISO Language Codes (639-1 and 693-2) and IETF Language Types
Node util for ISO Language Codes (639-1 and 693-2) and IETF Language Types
Created using the data from https://datahub.io/core/language-codes.
Use this util to get and validate the languages codes, countries and languages names.
Install the latest version:
npm i --save iso-lang-codes@latest
Require the module in your code & start using:
const codes = require('iso-lang-codes')
codes.validateLocaleCode('pt-PT')
Takes a locale code and checks if exists in the data dictionary
localeCode
string Language code (e.g. "en-GB")Returns boolean
Takes a language code and checks if exists in the data dictionary
languageCode
string Language code (e.g. "en")Returns boolean
Takes a country code and returns the list of languages valid for it
countryCode
string Country code (e.g. "PT")Returns Array<string> Languages list
Takes a country code and returns the list of locales valid for it
countryCode
string Country code (e.g. "PT")Returns Array<string> Locales list
Returns a list with a map of all existing locale codes and the respective country+language
Returns Object Locales list in the form of a map: ['pt-PT'] => 'Portuguese (Portugal)'
FAQs
Node util for ISO Language Codes (639-1 and 693-2) and IETF Language Types
The npm package iso-lang-codes receives a total of 4,531 weekly downloads. As such, iso-lang-codes popularity was classified as popular.
We found that iso-lang-codes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.