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

@medmain/core

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medmain/core - npm Package Compare versions

Comparing version 0.1.28 to 0.1.29

9

dist/browser/esm/locales/english.js

@@ -41,9 +41,12 @@ import capitalize from 'lodash/capitalize';

formatNumber: function formatNumber(number) {
return typeof number === 'number' ? numeral(number).format('0,0.[000]') : '--';
return typeof number === 'number' && !isNaN(number) ? numeral(number).format('0,0.[000]') : '--';
},
formatPercentage: function formatPercentage(percentage) {
return typeof percentage === 'number' ? numeral(percentage).format('0.000') + '%' : '--';
return typeof percentage === 'number' && !isNaN(percentage) ? numeral(percentage).format('0.000') + '%' : '--.---%';
},
formatArea: function formatArea(area) {
return typeof area === 'number' && !isNaN(area) ? numeral(area).format('0.000') + ' mm²' : '-.--- mm²';
},
formatFileSize: function formatFileSize(size) {
return typeof size === 'number' ? numeral(size).format('0.[0] b') : '--';
return typeof size === 'number' && !isNaN(size) ? numeral(size).format('0.[0] b') : '--';
},

@@ -50,0 +53,0 @@ formatStatus: function formatStatus(status) {

@@ -52,11 +52,15 @@ "use strict";

formatNumber(number) {
return typeof number === 'number' ? (0, _numeral.default)(number).format('0,0.[000]') : '--';
return typeof number === 'number' && !isNaN(number) ? (0, _numeral.default)(number).format('0,0.[000]') : '--';
},
formatPercentage(percentage) {
return typeof percentage === 'number' ? (0, _numeral.default)(percentage).format('0.000') + '%' : '--';
return typeof percentage === 'number' && !isNaN(percentage) ? (0, _numeral.default)(percentage).format('0.000') + '%' : '--.---%';
},
formatArea(area) {
return typeof area === 'number' && !isNaN(area) ? (0, _numeral.default)(area).format('0.000') + ' mm²' : '-.--- mm²';
},
formatFileSize(size) {
return typeof size === 'number' ? (0, _numeral.default)(size).format('0.[0] b') : '--';
return typeof size === 'number' && !isNaN(size) ? (0, _numeral.default)(size).format('0.[0] b') : '--';
},

@@ -63,0 +67,0 @@

@@ -42,11 +42,15 @@ import capitalize from 'lodash/capitalize';

formatNumber(number) {
return typeof number === 'number' ? numeral(number).format('0,0.[000]') : '--';
return typeof number === 'number' && !isNaN(number) ? numeral(number).format('0,0.[000]') : '--';
},
formatPercentage(percentage) {
return typeof percentage === 'number' ? numeral(percentage).format('0.000') + '%' : '--';
return typeof percentage === 'number' && !isNaN(percentage) ? numeral(percentage).format('0.000') + '%' : '--.---%';
},
formatArea(area) {
return typeof area === 'number' && !isNaN(area) ? numeral(area).format('0.000') + ' mm²' : '-.--- mm²';
},
formatFileSize(size) {
return typeof size === 'number' ? numeral(size).format('0.[0] b') : '--';
return typeof size === 'number' && !isNaN(size) ? numeral(size).format('0.[0] b') : '--';
},

@@ -53,0 +57,0 @@

{
"name": "@medmain/core",
"version": "0.1.28",
"version": "0.1.29",
"description": "Medmain's core module, root of everything else",

@@ -5,0 +5,0 @@ "files": [

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