
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Mapping between standard locale identifiers and Windows locale identifiers (LCID)
The 'lcid' npm package is used to map between standard locale identifiers and Windows locale identifiers (LCID). This is particularly useful when working with various Windows API that require LCID, or when integrating with systems that use Windows locale settings.
Mapping from locale to LCID
This feature allows you to convert a standard locale string to its corresponding Windows LCID. Useful for applications that need to interface with Windows APIs expecting locale identifiers in LCID format.
const lcid = require('lcid');
console.log(lcid.from('en_US')); // Outputs: 1033
Mapping from LCID to locale
This feature enables the conversion from a Windows LCID back to a standard locale string. It's beneficial when you receive LCID from Windows systems and need to use standard locale formats in your application.
const lcid = require('lcid');
console.log(lcid.to(1033)); // Outputs: 'en_US'
Similar to 'lcid', 'windows-locale' provides mappings between Windows locale identifiers and IETF language tags (which are similar to standard locale strings). However, it offers a broader range of mappings and additional metadata about the locales.
While 'locale-code' does not directly map LCIDs, it provides tools to convert between different locale formats (e.g., ISO, IETF). It's useful for applications that need to handle various types of locale identifiers but does not specifically target Windows LCID.
Mapping between standard locale identifiers and Windows locale identifiers (LCID)
The mapping itself is just a JSON file and can be used anywhere.
npm install lcid
import lcid from 'lcid';
lcid.from(1044);
//=> 'nb_NO'
lcid.to('nb_NO');
//=> 1044
lcid.all;
//=> {'af_ZA': 1078, …}
FAQs
Mapping between standard locale identifiers and Windows locale identifiers (LCID)
The npm package lcid receives a total of 5,011,709 weekly downloads. As such, lcid popularity was classified as popular.
We found that lcid 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.