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

@contrail/types

Package Overview
Dependencies
Maintainers
6
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 2.0.7 to 2.0.8

28

lib/formatter/property-value-formatter.spec.js

@@ -15,3 +15,3 @@ "use strict";

const val = objValFormatter.formatValue('Black', type_properties_1.PropertyType.String);
expect(val).toEqual("Black");
expect(val).toEqual('Black');
});

@@ -26,6 +26,6 @@ it('USD format currency values (wholesale)', () => {

const data = {
'USD': 54
USD: 54,
};
const val = objValFormatter.formatValue(data, type_properties_1.PropertyType.Currency);
expect(val).toEqual("$54.00");
expect(val).toEqual('$54.00');
});

@@ -40,6 +40,6 @@ it('Handle string value for number', () => {

const data = {
'USD': "54"
USD: '54'
};
const val = objValFormatter.formatValue(data, type_properties_1.PropertyType.Currency);
expect(val).toEqual("$54.00");
expect(val).toEqual('$54.00');
});

@@ -54,3 +54,3 @@ it('USD format currency values', () => {

const val = objValFormatter.formatValue(45, type_properties_1.PropertyType.Currency);
expect(val).toEqual("$45.00");
expect(val).toEqual('$45.00');
});

@@ -74,3 +74,3 @@ it('Germany format currency values', () => {

const val = objValFormatter.formatValue(75, type_properties_1.PropertyType.Currency);
expect(val).toEqual("¥75");
expect(val).toEqual('¥75');
});

@@ -85,3 +85,3 @@ it('Japanese format currency values (with decimal - override)', () => {

const val = objValFormatter.formatValue(75, type_properties_1.PropertyType.Currency, { format: type_properties_1.NumberFormat.Currency, precision: 2 });
expect(val).toEqual("¥75.00");
expect(val).toEqual('¥75.00');
});

@@ -96,5 +96,5 @@ it('Japanese Decimal format', () => {

let val = objValFormatter.formatValue(7500, type_properties_1.PropertyType.Number, { format: type_properties_1.NumberFormat.Decimal, precision: 2 });
expect(val).toEqual("7,500.00");
expect(val).toEqual('7,500.00');
val = objValFormatter.formatValue(7500, type_properties_1.PropertyType.Number, { format: type_properties_1.NumberFormat.Decimal, precision: 0 });
expect(val).toEqual("7,500");
expect(val).toEqual('7,500');
});

@@ -108,4 +108,4 @@ it('Percentage format', () => {

objValFormatter.setLocalConfig(localizationConfig);
let val = objValFormatter.formatValue(.45, type_properties_1.PropertyType.Percent, { format: type_properties_1.NumberFormat.Percent, precision: 0 });
expect(val).toEqual("45%");
const val = objValFormatter.formatValue(.45, type_properties_1.PropertyType.Percent, { format: type_properties_1.NumberFormat.Percent, precision: 0 });
expect(val).toEqual('45%');
});

@@ -115,3 +115,3 @@ it('Format Boolean value (true)', () => {

const val = objValFormatter.formatBoolean(true);
expect(val).toEqual("Yes");
expect(val).toEqual('Yes');
});

@@ -121,4 +121,4 @@ it('Format Boolean value (false)', () => {

const val = objValFormatter.formatBoolean(false);
expect(val).toEqual("No");
expect(val).toEqual('No');
});
});
{
"name": "@contrail/types",
"version": "2.0.7",
"version": "2.0.8",
"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