Comparing version 1.0.1 to 1.1.0
17
index.js
@@ -25,2 +25,14 @@ 'use strict'; | ||
var getAppleLocale = function () { | ||
childProcess.execFile('defaults', ['read', '-g', 'AppleLocale'], function (err, stdout) { | ||
if (err) { | ||
cb(err); | ||
return; | ||
} | ||
cache = stdout.trim() || 'en_US'; | ||
cb(null, cache); | ||
}); | ||
}; | ||
if (process.platform === 'win32') { | ||
@@ -46,2 +58,7 @@ childProcess.execFile('wmic', ['os', 'get', 'locale'], function (err, stdout) { | ||
if (!res && process.platform === 'darwin') { | ||
getAppleLocale(); | ||
return; | ||
} | ||
cache = getLocale(res && res[1]); | ||
@@ -48,0 +65,0 @@ cb(null, cache); |
{ | ||
"name": "os-locale", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Get the system locale", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3625
55