Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

os-locale

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

os-locale - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

14

index.js

@@ -13,5 +13,5 @@ 'use strict';

function getEnvLocale() {
var env = process.env;
var ret = env.LC_ALL || env.LANGUAGE || env.LANG || env.LC_MESSAGES;
function getEnvLocale(env) {
env = env || process.env;
var ret = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE;
cache = getLocale(ret);

@@ -22,4 +22,8 @@ return ret;

function parseLocale(x) {
var res = /(?:LC_ALL|LANG|LC_MESSAGES|LC_CTYPE|)="([^"]{2,})"/.exec(x);
return res && res[1];
var env = x.split('\n').reduce(function (env, def) {
def = def.split('=');
env[def[0]] = def[1];
return env;
}, {});
return getEnvLocale(env);
}

@@ -26,0 +30,0 @@

{
"name": "os-locale",
"version": "1.3.1",
"version": "1.4.0",
"description": "Get the system locale",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,3 +7,5 @@ # os-locale [![Build Status](https://travis-ci.org/sindresorhus/os-locale.svg?branch=master)](https://travis-ci.org/sindresorhus/os-locale)

POSIX systems: The returned locale refers to the [`LC_MESSAGE`](http://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories) category, suitable for selecting the language used in the user interface for message translation.
## Install

@@ -10,0 +12,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc