make utils file
This commit is contained in:
parent
86b1198e5d
commit
940b833418
3 changed files with 4 additions and 4 deletions
|
|
@ -73,10 +73,6 @@ function validateAndFormatEurAmountInput() {
|
||||||
eurAmountInput.classList.add('input-is-invalid');
|
eurAmountInput.classList.add('input-is-invalid');
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumberWithSpaces(num) {
|
|
||||||
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateBtcInput() {
|
function updateBtcInput() {
|
||||||
const eurToSatRate = 1021;
|
const eurToSatRate = 1021;
|
||||||
const cleanEurAmount = readIntFromEurAmountInput();
|
const cleanEurAmount = readIntFromEurAmountInput();
|
||||||
|
|
|
||||||
3
src/public/javascript/utils.js
Normal file
3
src/public/javascript/utils.js
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
function formatNumberWithSpaces(num) {
|
||||||
|
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
||||||
|
}
|
||||||
|
|
@ -81,5 +81,6 @@
|
||||||
|
|
||||||
<%- include("partials/appCommonScripts") %>
|
<%- include("partials/appCommonScripts") %>
|
||||||
<script src="/javascript/offers.js"></script>
|
<script src="/javascript/offers.js"></script>
|
||||||
|
<script src="/javascript/utils.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue