Comparing version 1.1.3 to 1.2.0
@@ -9,2 +9,8 @@ 'use strict'; | ||
var externalRegeditVBSLocation = null; | ||
function setRegeditExternalVBSLocation(vbsDirectory) { | ||
externalRegeditVBSLocation = vbsDirectory; | ||
} | ||
function getRegionalSettings(callback) { | ||
@@ -27,2 +33,6 @@ function _getDateOrder(registryConst) { | ||
if (externalRegeditVBSLocation) { | ||
regedit.setExternalVBSLocation(externalRegeditVBSLocation); | ||
} | ||
regedit.list('HKCU\\Control Panel\\International', function (err, entries) { | ||
@@ -83,8 +93,9 @@ if (err) { | ||
var _amount = amount || 0; | ||
var _currency = currency != undefined ? currency.toUpperCase() + ' ' : ''; | ||
var _currency = currency || 'CHF'; | ||
var stdAmount = _amount.toLocaleString('en-US', { minimumFractionDigits: settings.digitsNo }).replace(',', stdThSep).replace('.', stdDecSep); | ||
return _currency + stdAmount.replace(stdThSep, settings.thousandSep).replace(stdDecSep, settings.decimalSep); | ||
return _currency + ' ' + stdAmount.replace(stdThSep, settings.thousandSep).replace(stdDecSep, settings.decimalSep); | ||
} | ||
module.exports.setRegeditExternalVBSLocation = setRegeditExternalVBSLocation; | ||
module.exports.getRegionalSettings = getRegionalSettings; | ||
@@ -91,0 +102,0 @@ module.exports.getDefaultRegionalSettings = getDefaultRegionalSettings; |
{ | ||
"name": "cultura", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "formatting dates and numbers according to os settings", | ||
@@ -38,3 +38,3 @@ "engine": { | ||
"optionalDependencies": { | ||
"regedit": "^2.2.6" | ||
"regedit": "^3.0.3" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
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
9829
117
7