Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
lcid
Advanced tools
Package description
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.
Readme
Mapping between standard locale identifiers and Windows locale identifiers (LCID)
Based on the mapping used in the Python standard library.
The mapping itself is just a JSON file and can be used anywhere.
$ npm install lcid
const lcid = require('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 4,187,666 weekly downloads. As such, lcid popularity was classified as popular.
We found that lcid 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
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.