@contrail/types
Advanced tools
Comparing version 0.0.5 to 0.0.6
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./property-value-formatter")); | ||
__exportStar(require("./property-value-formatter"), exports); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PropertyValueFormatter = void 0; | ||
class PropertyValueFormatter { | ||
@@ -29,3 +30,2 @@ constructor() { | ||
val = value[this.localizationConfig.currencyCode]; | ||
console.log(`val from currency formatter ${val}`); | ||
} | ||
@@ -32,0 +32,0 @@ return new Intl.NumberFormat(this.localizationConfig.locale, { style: 'currency', currency: this.localizationConfig.currencyCode }).format(val); |
@@ -45,8 +45,17 @@ "use strict"; | ||
currencyCode: 'EUR', | ||
locale: 'de', | ||
locale: 'de-DE', | ||
}; | ||
objValFormatter.setLocalConfig(localizationConfig); | ||
const val = objValFormatter.formatValue(45, 'currency'); | ||
expect(val).toEqual("45,00 €"); | ||
}); | ||
it('Japanese format currency values', () => { | ||
const objValFormatter = new property_value_formatter_1.PropertyValueFormatter(); | ||
const localizationConfig = { | ||
currencyCode: 'JPY', | ||
locale: 'ja-JP', | ||
}; | ||
objValFormatter.setLocalConfig(localizationConfig); | ||
const val = objValFormatter.formatValue(75, 'currency'); | ||
expect(val).toEqual("¥75"); | ||
}); | ||
}); |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./formatter")); | ||
__export(require("./properties")); | ||
__exportStar(require("./formatter"), exports); | ||
__exportStar(require("./properties"), exports); |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./property-types")); | ||
__exportStar(require("./property-types"), exports); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PropertyTypes = void 0; | ||
var PropertyTypes; | ||
@@ -4,0 +5,0 @@ (function (PropertyTypes) { |
{ | ||
"name": "@contrail/types", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Types Utility module", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8807
200
0