@flywire/react-headlessui
Advanced tools
Comparing version 0.0.14-2 to 0.0.14-3
@@ -89,3 +89,8 @@ "use strict"; | ||
}; | ||
return (0, utils_1.toMoney)(typeof value === 'string' ? (0, utils_1.toNumber)(value.toString(), options) : value, options); | ||
const valueAsNumber = typeof value === 'string' ? (0, utils_1.toNumber)(value.toString(), options) : value; | ||
const money = (0, utils_1.toMoney)(valueAsNumber, options); | ||
console.log('format - value', value); | ||
console.log('format - valueAsNumber', valueAsNumber); | ||
console.log('format - money', valueAsNumber); | ||
return money; | ||
} | ||
@@ -95,2 +100,7 @@ return (0, utils_1.formatNumber)((0, utils_1.parseNumber)(value), { decimals }); | ||
function parse(value) { | ||
const valueAsNumber = (0, utils_1.toNumber)(value.toString(), { | ||
decimal: decimalMark, | ||
}); | ||
console.log('parse - value', value); | ||
console.log('parse - valueAsNumber', valueAsNumber); | ||
return hasCustomFormatter | ||
@@ -97,0 +107,0 @@ ? (0, utils_1.toNumber)(value.toString(), { |
@@ -64,3 +64,8 @@ import { useEffect, useState, } from 'react'; | ||
}; | ||
return toMoney(typeof value === 'string' ? toNumber(value.toString(), options) : value, options); | ||
const valueAsNumber = typeof value === 'string' ? toNumber(value.toString(), options) : value; | ||
const money = toMoney(valueAsNumber, options); | ||
console.log('format - value', value); | ||
console.log('format - valueAsNumber', valueAsNumber); | ||
console.log('format - money', valueAsNumber); | ||
return money; | ||
} | ||
@@ -70,2 +75,7 @@ return formatNumber(parseNumber(value), { decimals }); | ||
function parse(value) { | ||
const valueAsNumber = toNumber(value.toString(), { | ||
decimal: decimalMark, | ||
}); | ||
console.log('parse - value', value); | ||
console.log('parse - valueAsNumber', valueAsNumber); | ||
return hasCustomFormatter | ||
@@ -72,0 +82,0 @@ ? toNumber(value.toString(), { |
@@ -98,3 +98,8 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
}; | ||
return (0, utils_1.toMoney)(typeof value === 'string' ? (0, utils_1.toNumber)(value.toString(), options) : value, options); | ||
const valueAsNumber = typeof value === 'string' ? (0, utils_1.toNumber)(value.toString(), options) : value; | ||
const money = (0, utils_1.toMoney)(valueAsNumber, options); | ||
console.log('format - value', value); | ||
console.log('format - valueAsNumber', valueAsNumber); | ||
console.log('format - money', valueAsNumber); | ||
return money; | ||
} | ||
@@ -104,2 +109,7 @@ return (0, utils_1.formatNumber)((0, utils_1.parseNumber)(value), { decimals }); | ||
function parse(value) { | ||
const valueAsNumber = (0, utils_1.toNumber)(value.toString(), { | ||
decimal: decimalMark, | ||
}); | ||
console.log('parse - value', value); | ||
console.log('parse - valueAsNumber', valueAsNumber); | ||
return hasCustomFormatter | ||
@@ -106,0 +116,0 @@ ? (0, utils_1.toNumber)(value.toString(), { |
{ | ||
"name": "@flywire/react-headlessui", | ||
"version": "0.0.14-2", | ||
"version": "0.0.14-3", | ||
"description": "Headless UI components", | ||
@@ -5,0 +5,0 @@ "main": "./dist/umd/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
323456
5245