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

@contrail/types

Package Overview
Dependencies
Maintainers
4
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/types - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

15

lib/formatter/index.js
"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",

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