
Product
Announcing Socket Certified Patches: One-Click Fixes for Vulnerable Dependencies
A safer, faster way to eliminate vulnerabilities without updating dependencies
@phensley/language-tag
Advanced tools
Implements BCP 47 language tag parsing and construction.
NPM:
npm install --save @phensley/language-tag
Yarn:
yarn add @phensley/language-tag
const IDS = ['en', 'es', 'es-419', 'und-AR', 'und-Hant', 'iw', 'i-klingon'];
for (const id of IDS) {
const tag = parseLanguageTag(id);
console.log(`${tag.compact().padStart(10)} ${tag.expanded()}`);
}
en en-Zzzz-ZZ
es es-Zzzz-ZZ
es-419 es-Zzzz-419
und-AR und-Zzzz-AR
und-Hant und-Hant-ZZ
iw iw-Zzzz-ZZ
tlh tlh-Zzzz-ZZ
const t = new LanguageTag(undefined, 'latn', 'us', 'PoSiX', {
u: ['ca-gregory']
});
console.log(t.expanded());
und-Latn-US-posix-u-ca-gregory
FAQs
Parsing and construction of BCP 47 language tags
We found that @phensley/language-tag demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.